import java.util.*;
public class Point
{
  public Point(double x, double y) { this.x = x; this.y = y; }
  public Point clone() { return new Point(x,y); }
  public double getX() { return x; }
  public double getY() { return y; }
  public double getAngle() { double a = Math.atan(y/x); return a; }  
  public double getRadius() { return Math.sqrt(x*x + y*y); }
  public static Point mkPointFromAngleRadius(double a, double r)
  {
    return new Point(r*Math.cos(a),r*Math.sin(a));
  }
  public void subtractBy(Point p) { x -= p.x; y -= p.y; }
  public void multiplyBy(double d) { x *= d; y *= d; }
  public void rotateCCBy(double ang)
  {
    double a = getAngle();
    double r = getRadius();
    Point tmp =  mkPointFromAngleRadius(a+ang,r);
    x = tmp.x;
    y = tmp.y;
  }
  public String toString() { return "" + x + " " + y; }
  public static Point read(Scanner sc)
  {
    if (!sc.hasNextDouble()) { return null; }
    double x = sc.nextDouble(); 
    if (!sc.hasNextDouble()) { return null; }
    double y = sc.nextDouble(); 
    return new Point(x,y);
  }
  
  private double x, y;

  public static void main(String[] args)
  {
    Point A = new Point(1,1);
    A.rotateCCBy(Math.PI/4);
    System.out.println(A);
  }
}