def __eq__(self, other):
    return (isinstance(other, XY) and (self.x == other.x) and (self.y == other.y))
def __eq__(self, other):
    return (isinstance(other, XY) and (self.x == other.x) and (self.y == other.y))