Find all pairs of integers $(x, y)$ satisfying $x^{2}=y^{2}+y+1$
If $y>0, y^{2}y^{2}+y+1>(y+1)^{2}$, so for the same reason, there are no solutions.

If $y=0, y^{2}+y+1=1=( \pm 1)^{2}$

If $y=-1, y^{2}+y+1=1=( \pm 1)^{2}$

Finally, the solution pairs are $(-1,-1) ;(-1,0) ;(1,-1) ;(1,0)$

## Exercises on the application of congruences