class C { final int x; final int y; C (int x, int y) { this.x = x; this.y = y; } int hashCode () { return this.x + 31 * this.y; } }
public boolean equals (C that) { return this.x == that.x && this.y == that.y; }