(xy-1)^2+(x+y-2xy)(x+y-2)
=(xy-1)^2+4xy+(x+y)^2-2(xy+1)(x+y)
=(xy+1)^2+(x+y)^2-2(xy+1)(x+y)
=(x+1)^2(y+1)^2