Let $n, m$ be positive integers of different parity, and $n > m$. Find all integers $x$ such that $\frac{x^{2^n} - 1}{x^{2^m} - 1}$ is a perfect square.

Let's think step by step and output the final answer within \boxed{}.
user