integral ordered pair $(x,y)$ in $x^2+y^2=2x+2y+xy$ 
Find all possible integral ordered pair $(x,y)$ in $x^2+y^2=2x+2y+xy$

what i try $y^2-(x+2)y+x^2-2x=0$
$$y=\frac{x+2\pm\sqrt{(x+2)^2-4(x^2-2x)}}{2}$$
$$y=\frac{x+2\pm \sqrt{-3x^2+12x+4}}{2}$$
How do i solve it Help me please 
 A: Hint:
If $x\le-1$ or $x\ge5$ then $-3x^2+12+4<0$, so its square root is not real;
that limits the possibilities to a few you could check.
A: The equation is equivalent to $(x-y)^{2}+(x-2)^{2}+(y-2)^{2}=8$. However due to symmetry we can assume $x-y\geq 0$ but then there are only three possible choices $x-y=0,1,2$. If $x-y=0$ $(x,y)=(0,0),(4,4)$ if $x-y=1$ then $7=(y-1)^{2}+(y-2)^{2}=0+7=1+6=2+5=3+4$ so no solution.
If $x-y=2$ then $y^{2}+(y-2)^{2}=4=0+4=3+1=2+2$ thus only possible $y=0$ or $y=2$ thus $(x,y)=(2,0),(4,2)$.
Thus all possible solutions are $(x,y)=(2,0),(0,2),(4,2),(2,4),(0,0),(4,4)$
A: Look at the discriminant which should be positive definite so the $y$ is real for real $x$. This demands 
$$-3x^2+12x+4 \ge 0 \implies 3x^2-12x-4 \le 0 \implies (x-4.3)(x+.3) \le 0  \implies -.3 \le x \le 4.3 ~~(roughly)$$
So the possible integral values of $x$ are $x=0,1,2,3,4$
out of these we accept the ones which give $y$ as integrals.
Check that $x=0,1,2,4$ give integral values of $y$, such pairs of  $x$ and $y$ are the solutions.
