xy equals check