There's an infinite number of such pairs. Letting works, where is an integer. In fact, has to be a square.

Why? Consider prime factorizations of and , suppose , and use uniqueness of prime factorizations:

where the equation implies that

for all . Hence , whence must be even. In conclusion, each is a square, and so all of is square.