\(x^2-\left(y+1\right)x+y^2-y=0\) (1)
\(\Delta=\left(y+1\right)^2-4\left(y^2-y\right)\ge0\)
\(\Rightarrow-3y^2+6y+1\ge0\)
\(\Rightarrow\frac{3-2\sqrt{3}}{3}\le y\le\frac{3+2\sqrt{3}}{3}\)
Do y nguyên \(\Rightarrow y=\left\{0;1;2\right\}\)
Thế vào (1) tìm x nguyên