I think there's a bit of a problem with your logic that if

then all the powers in the prime factorization of

will be even. If you think about it

, and

is not even ...

But if you use Taluivren's hint, you can take the prime decomposition of

, and all the powers have to be even. Since

, we can rearrange the prime decomposition of

so it is written as the prime decomposition of

multiplied by the prime decomposition of

. Then, we look at the respective prime decompositions and notice that the powers are all even. Again, by the hint, we have that

and

are also perfect squares.