Its unfortunate that I have a long messy,sloppy approach... I have a hunch that there is an elegant method using clever number theoretic arguments... but I dont know it.

But modulo 3, squares are always 0 or 1, thereby forcing m to be even.

Now lets call

The factors of power of three are all lesser powers of three. Thus for some r, we get 2 equations:

Now note that this implies

r > 0 is not possible because then the RHS is divisible by 3 and the LHS is not.

Thus r = 0. This forces the equations to read:

Reading modulo 4 now, . This forces n to be even.

Let , and repeat the same old process,

The factors of power of 2 are all lesser powers of two. Thus for some r, we get 2 equations:

-----------------------------(**)

The above equation clearly forces r = 1,k+1-r = 2 hence k = 2.

Now since

Thus and are the only solutions.

Check:

--------------------------------------------------------------------------------------------------------------------------------------------

(**)

There are now various ways to solve it. One simple thing we can observe is that for x,y > 1, RHS mod 2 is 1, but LHS mod 2 is 0. So at least one of x and y is 1. Clearly x = 1 is not possible. The only remaining condition: y=1 forces x=2.

Thus