# Relatively Prime & Perfect Squares

1) Suppose that a and b are relatively prime natural numbers such that ab is a perfect square (i.e. is the square of a natural number). Show that a and b are each perfect squares.

a=(a1^p1)(a2^p2)(a3^p3)...(a_n^p_n), a_i distinct primes
b=(b1^q1)(b2^q2)(b3^q3)... (b_m^q_m), b_j distinct primes
ab=(a1^p1)(a2^p2)(a3^p3)...(a_n^p_n) (b1^q1)(b2^q2)(b3^q3)... (b_m^q_m)

a and b are relateively prime, so none of a_i is equal to any of b_j, i.e. a_i and b_j are mutually distinct primes for all i and j

Since ab is a perfect square
ab=(a1^p1)(a2^p2)(a3^p3)...(an^pn) (b1^q1)(b2^q2)(b3^q3)... (bm^qm) = (c1^2k1)(c2^2k2)...(c_r^2k_r)
where c_i are distinct primes

How can I go on from here?

Thanks for any help!