12. (2005 Czech-Polish-Slovak Mathematical Competition) Find all integer pairs $(x, y)$ that satisfy the equation $y(x+y)=x^{3}-7 x^{2}+11 x-3$.
12. The original equation is equivalent to
$$
(2 y+x)^{2}=4 x^{3}-27 x^{2}+44 x-12=(x-2)\left(4 x^{2}-19 x+6\right)=(x-2)[(x-2)(4 x-11)-16] .
$$

When $x=2$, $y=-1$ satisfies the original equation.
If $x \neq 2$, since $(2 y+x)^{2}$ is a perfect square, let $x-2=k s^{2}$, where $k \in\{-2,-1,1,2\}$, and $s$ is a positive integer. In fact, if there exists a prime $p$ and a non-negative integer $m$, such that $p^{2 m+1}$ divides $x-2$, and $p^{2 m+2}$ does not divide $x-2$, then $p$ divides $(x-2) \cdot (4 x-11)-16$, which implies $p \mid 16$, i.e., $p=2$.
If $k= \pm 2$, then $4 x^{2}-19 x+6= \pm 2 n^{2}$, where $n$ is a positive integer, i.e.,
$(8 x-19)^{2}-265= \pm 32 n^{2}$.
Since $\pm 32 n^{2} \equiv 0, \pm 2(\bmod 5)$,
$$
(8 x-19)^{2} \equiv 0, \pm 1(\bmod 5),
$$

and $25 \times 265$, a contradiction.
If $k=1$, then $4 x^{2}-19 x+6=n^{2}$, where $n$ is a positive integer,

i.e., $265=(8 x-19)^{2}-16 n^{2}=(8 x-19-4 n)(8 x-19+4 n)$.
Considering the four cases
$$
265=1 \times 265=5 \times 53=(-265) \times(-1)=(-53) \times(-5)
$$

we obtain the corresponding $x, n$ such that $x-2=s^{2}$ is a perfect square.
Only $x=6$ satisfies the condition, thus $y=3$ or $y=-9$.
If $k=-1$, then $4 x^{2}-19 x+6=-n^{2}$, where $n$ is a positive integer, i.e.,
$265=(8 x-19)^{2}+16 n^{2}$.
By $16 n^{2} \leqslant 265$, we get $n \leqslant 4$.
When $n=1,2$, $4 x^{2}-19 x+6=-n^{2}$ has no integer solutions;
When $n=3$, we get the integer solution $x=1$, thus, $y=1$ or $y=-2$;
When $n=4$, we get the integer solution $x=2$, a contradiction.
In summary, the pairs $(x, y)$ that satisfy the conditions are
$$
\{(6,3),(6,-9),(1,1),(1,-2),(2,-1)\} \text {. }
$$