
class MyVector  {

  int x, y;

  public MyVector (int x, int y) {
    this.x = x;
    this.y = y;
  }

  public static void swap_1(MyVector p, MyVector v) {

    MyVector temp = p;
    p = v;
    v = temp;
  }

  public void swap_2(MyVector p) {

    MyVector temp = new MyVector(this.x, this.y);
    this.x = p.x;
    this.y = p.y;
    p.x = temp.x;
    p.y = temp.y;
  }

  public void swap_3(MyVector p) {

    MyVector temp = this;
    this.x = p.x;
    this.y = p.y;
    p.x = temp.x;
    p.y = temp.y;
  }

  public String toString() {
    return ("(x = " + x + ", y = " + y + ")");
  }

}
