Help with CSES problem Common Divisors

Here