import java.util.*;

class Point {
  private int x, y;
  Point(int x, int y) {
    this.x = x;
    this.y = y;
  }
  public String toString() {
    return "(" + this.x + ", " + this.y + ")";
  }
  public boolean equals(Object o) {
    Point p = (Point) o;
    boolean b = (this.x == p.x) && (this.y == p.y);
    System.out.print(this + ((b) ? " == " : " != ") + p + "; ");
    return (this.x == p.x) && (this.y == p.y);
  }
  public int hashCode() { return x & y;}
}

class SimplePointTest {
  public static void main(String[] args) {
    Set p = new HashSet();
    Point z = new Point(0,0);
    Point u = new Point(0,0);
    System.out.println(u.equals(z));
    p.add(z);
    if (!p.contains(u))
      p.add(u);
    System.out.println(p.size());
    p.add(new Point(6,0)); System.out.println();   
    p.add(new Point(0,0)); System.out.println();   
    p.add(new Point(3,3)); System.out.println();   
    p.add(new Point(0,0)); System.out.println();
    p.add(new Point(1,1)); System.out.println();
    System.out.println("taille : " + p.size());
    System.out.println(p);
  }
}

