Suppose that $a$ and $b$ are relatively prime natural numbers such that $ab$ is a perfect square. Show that $a$ and $b$ are each perfect squares. Is there any other way of proving this besides showing that all of their respective factors or representation have an even number of exponents?
Let $$ab =d^2$$

Let $m = \max \{a,b\}$. If $m=1$ then $a=b=1$ and we are done. Now suppose there exist $m&gt;1$. Then among all $m$ take minimal one. There exit a prime $p$ such that $p\mid m$. But then $p\mid d$ and so $p^2\mid m$. Say $a&gt;b$. Put $a' = a/p^2$ and $d' = d/p$, so we have $$a'b = d'^2$$ 
and $m' = \max \{a',b\} &lt; m$. A contradiction.
Hint:

Consider their prime factorization knowing that the powers of the prime factors of any square number are all even.