If $x$ and $y$ are prime numbers which satisfy $x^2-2y^2=1$, solve for $x$ and $y$.
My attempt:
$x^2-2y^2=1$
$\implies (x+\sqrt{2}y)(x-\sqrt{2}y)=1$
$\implies (x+\sqrt{2}y)=1$ and $(x-\sqrt{2}y)=1$
$\implies x=1$ and $y=0$
Clearly $x$ and $y$ are not prime numbers . Why is my solution not working. I have been able to solve similar type of equations by factorizing and then listing down the integer factors and the different cases. Why is it not working here?