Find the minimum value of $f=x^2+y^2+x(1-y)+y(1-x)$, holds on $x,y$ are integers. Let $x$ and $y$ are integers such that $-2\le x\le3$ and $-8\le y\le4$
Find the minimum value of $f=x^2+y^2+x(1-y)+y(1-x)\tag{1}$
From $(1)$, I get $f=(x-y)^2+x+y$ and I don't know what I should do next.
I had tried to use differential of f then I get no critical point (the minimum is on the bound $x=-2,x=3,y=-8$ or $y=4$). I found the minimum on $x=-2$ but $y=-2.5$ that isn't integer, the equation f that holds on $x=-2$ is $(y+2.5)^2-4.25,$ So no conclusion for $x,y$ are integers or Can it conclude that $y=2,3$ minimize f ? (I think this solution is suitable for real numbers).
I had tried to substitute all the possible cases then I got the minimum is $-4$, when $(x,y)$=$(-2,-2)$, $(-2,-3)$.  
All help would be appreciated.

This is a kind of solving :
you can write a program in matlab to find minimum 
a=zeros(6,13);  
for x=-2:3 
for y=-8:4  


    a(x+3,y+9)=(x-y)^2+x+y
end; 

end;
if you run this ,you will have 
$f(x,y)=(x-y)^2+x+y$

as you can see max $f(x,y)=116 $ ,min $f(x,y)=-4$
