Firstly, , so .

Since is even let . Then , so must be even, say .

Now any common factor of and must be a factor of and of , since . But , so must hold.

Therefore also. But , so . Therefore since and we have and with .

Therefore and .

Finally , so as take with and (letting and gives the same solutions.)