Let $a$ and $b$ be positive integers. How can I easily prove that if $ab$ is a perfect square and $GCD(a,b)=1$ then $a$ and $b$ are perfect squares.
I actually managed to prove that this way:
if an integer $n$ is a perfect square, then all the powers of the prime numbers of its integer factorization are even. So if an integer is not a perfect square, then at least one the prime numbers of its integer factorization is odd.
Then, reasoning by the absurd, we suppose that $a$ and $b$ are not perfect squares and considering that their GCD is 1, no prime number of its integer factorizations is the same, so $ab$ is not a perfect square, which is absurd.
Even if this proof seems convincing, I'd like to know if it was possible to solve the problem another easier way (In exam conditions, I'd have to prove the proposition that if "if an integer $n$ is a perfect square, then all the powers of the prime numbers of its integer factorization are even" considering that it's not included in the course given by the teacher, so It would get a little tedious)