import java.io.*;


public class class2 {

   private static void pause() {
    try {
      System.in.read();
    }
    catch (IOException e) {
    }
  }  // pause


  public static void main(String[] args) {
    PXY pxy1 = new PXY(13,45,"qqq");
    PXY pxy2 = new PXY(23,65,"hallo");
    PXY pxy3 = new PXY( pxy2 );
    //pxy3.addX(11);
    double d = pxy3.getDistance(pxy1);

    System.out.println( d );
    pause();
  }
}


class PX   {
  private int x;

  public PX(int x) {
    this.x=x;
  }

  public void add(int deltax) {
    this.x+=deltax;
  }

  public int getX() {
    return x;
  }

  public String toString() {
    return "Value x: "+x;
  }

}


class PXY   {
  private int x;
  private int y;
  private String name;

  public PXY() {
    this(1,1);
  }

  public PXY(PXY p) {
    x=p.x;
    y=p.y;
    name=p.name;
  }
  public double getDistance(PXY p) {
    double d1 = this.x - p.x;
    double d2 = this.y - p.y;
    double erg = Math.sqrt(   d1*d1 + d2*d2);
    return erg;
  }


  public PXY(int x, int y) {
    this(x,y,"");
  }
  public PXY(int x, int y, String name) {
    this.x=x;
    this.y=y;
    this.name=name;
  }


  public void addX(int deltax) {
    this.x+=deltax;
  }

  public int getX() {
    return x;
  }
  public int getY() {
    return y;
  }

  public String getName(){
    return name;
  }

  public String toString() {
    return "Name: "+name+"   Value x: "+x;
  }

}

