a=p_1^\alpha p_2^\beta p_3^\gamma ...
b=P_1^\alpha P_2^\beta P_3^\gamma ....
Needless to mention p_i's & P_i's are primes.
Since P_i\ne p_j for any (i,j), g.c.d(a2,b2)=1 as well, as prime factors of a2 and b2 are same.
a=p_1^\alpha p_2^\beta p_3^\gamma ...
b=P_1^\alpha P_2^\beta P_3^\gamma ....
Needless to mention p_i's & P_i's are primes.
Since P_i\ne p_j for any (i,j), g.c.d(a2,b2)=1 as well, as prime factors of a2 and b2 are same.