804. Solve the equation in integers

$$
x^{2}-x y+y^{2}=x+y
$$
$\triangle$ The methods we used to solve problems 799-802 do not achieve the goal here. Let's try to gather all terms of the equation on the left side and arrange them by the degree of $x$:

$$
x^{2}-(y+1) x+\left(y^{2}-y\right)=0
$$

We will consider the last equation as a quadratic equation in terms of $x$. Its discriminant $D$ depends on $y$. It must be the square of some integer $t$:

$$
\begin{gathered}
D=(y+1)^{2}-4\left(y^{2}-y\right)=t^{2}, \quad y^{2}+2 y+1-4 y^{2}+4 y=t^{2} \\
-3 y^{2}+6 y+1=t^{2}
\end{gathered}
$$

We have obtained a new quadratic equation with two integer unknowns $y$ and $t$. It is simpler than the original equation.

Gather all terms of the equation on one side and transform the new equation:

$$
3 y^{2}-6 y-1+t^{2}=0, \quad 3\left(y^{2}-2 y\right)-1+t^{2}=0
$$

$3\left(\left(y^{2}-2 y+1\right)-1\right)-1+t^{2}=0, \quad 3(y-1)^{2}-3-1+t^{2}=0, \quad 3(y-1)^{2}+t^{2}=4$.

From the last equation, it follows that $t^{2} \leqslant 4$, i.e., $|t| \leqslant 2$. Let's try the few possible values of $t$ here.

1) If $t^{2}=0$, then $3(y-1)^{2}=4$, which is impossible for integer $y$.
2) If $t^{2}=1$, then

$$
3(y-1)^{2}=3, \quad(y-1)^{2}=1, \quad y-1= \pm 1, \quad y_{1}=2, \quad y_{2}=0 .
$$

Take the value $y=2$ and substitute it into the quadratic equation:

$$
x^{2}-3 x+2=0
$$

Then $x=1$ or $x=2$. We get the solutions: $(1 ; 2)$ and ( $2 ; 2)$.

Similarly, we find the solutions for $y=0$:

$$
x^{2}-x=0
$$

from which $x=0$ or $x=1$. We get the solutions: $(0 ; 0)$ and $(1 ; 0)$.

3) Let $t^{2}=4$. Then

$$
3(y-1)^{2}=0, \quad y=1
$$

Now calculate $x$:

$$
x^{2}-2 x=0
$$

from which $x=0$ or $x=2$. We have found two more solutions: $(0 ; 1)$ and $(2 ; 1)$.

Answer: $(1 ; 2),(2 ; 2),(0 ; 0),(1 ; 0),(0 ; 1),(2 ; 1)$.