I proceeded like this. Let $a \leq b$.
Since $gcd(a,b)=lcm(a,b)$, then $gcd(a,b)^2=ab$
Now $gcd(a,b)=\pm\sqrt ab$ which is an integer. So b must be of the form $am^2$
so the numbers are a and $am^2$ whose gcd is clearly a. hence $gcd(a,b)=a=\pm am$ which implies $m=\pm 1$
so $b=am^2=\pm a$ which is proved. I do not know how to prove the converse.