import java.util.Scanner;

public class Vector
{
  private double x = 0.0;
  private double y = 0.0;
  private static Scanner teclado = new Scanner(System.in);
  
  public boolean leer()
  {
    System.out.print("x: ");
    x = teclado.nextDouble();
    if ( x == 0.0 ) return false;
    
    System.out.print("y: ");
    y = teclado.nextDouble();
    return true;
  }
  
  public String toString()
  {
    return "V :(x , y)= (" + x + " , " + y;
  }
  
  public  double magnitud()
  {
    return Math.sqrt((x*x)+(y*y)); 
  }
  
  public double direccion()
  {
    return Math.atan2(x,y);
  }
  
  public Vector sumar(vector otra)
  {
    return new Vector(x + otra.x);
     
  }
  
}