## Task A-1.2.

Determine all integers $x, y, z$ for which the following equations hold

$$
x-y z=1 \quad \text { and } \quad x z+y=2
$$
## First Solution.

If $y=0$, from the first equation we have $x=1$, and from the second $xz=2$. Substituting $x=1$ gives $z=2$, so one solution is $(x, y, z)=(1,0,2)$.

If $y \neq 0$, from the first equation we have $z=\frac{x-1}{y}$.

Substituting into the second equation, we get

$$
\begin{gathered}
x \frac{x-1}{y}+y=2 \\
x(x-1)+y^{2}=2 y \\
x(x-1)+y^{2}-2 y+1-1=0 \\
x(x-1)+(y-1)^{2}=1
\end{gathered}
$$

If $x$ is 0 or 1, $x(x-1)=0$. If $x$ is negative or greater than 1, $x(x-1)$ is positive. Therefore, the product $x(x-1)$ is always non-negative.

Also, $(y-1)^{2} \geqslant 0$, so the equation $x(x-1)+(y-1)^{2}=1$ is only satisfied if one of the addends is 0 and the other is 1.

Furthermore, $x$ and $x-1$ have different parities, so $x(x-1)$ is an even number.

Therefore, it must be that $x(x-1)=0$ and $(y-1)^{2}=1$, meaning $x$ is 0 or 1, and $y$ is 0 or 2.

For $y=0$, the only solution is the one obtained above.

If $y=2$, substituting the possibilities for $x$ gives:

- $x=1$, then $z=\frac{1-1}{2}=0$.
- $x=0$, then $z=\frac{0-1}{2}=-\frac{1}{2}$, which is not possible since $z$ must be an integer.

Therefore, the solutions are $(x, y, z)=(1,2,0)$ and $(x, y, z)=(1,0,2)$.

Note: Instead of from the equation

$$
x(x-1)+(y-1)^{2}=1
$$

similar conclusions can be drawn from the equation

$$
x(x-1)+y(y-2)=0 \text {. }
$$

Solutions that use this equation also receive the same 2 points (the third and fourth points) from the scoring scheme above.