If they are both even, we can divide the equation by $4$, getting $m'^2=2n'^2$ with $m=2m'$ and $n=2n'$. We can keep doing this until at least one is not even. As each has a finite number of factors of $2$, we can only do it a finite number of times.