#include <iostream>
#include <cmath>
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;

class Point{
public:
  double x, y;
  Point(double x=0, double y=0):x(x), y(y){}
  Point operator + (Point p){ return Point(x+p.x, y+p.x);}
  Point operator - (Point p){ return Point(x-p.x, y-p.y);}
  Point operator * (double a){ return Point(a*x, a*y);}
  double abs(){ return sqrt(norm());}
  double norm(){ return x*x+y*y;}
  bool operator < (const Point &p) const{
    return x != p.x ? x < p.x : y < p.y;
  }
  bool operator == (const Point &p) const{
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};

main(){
  int n;
  double ansx[1000];
  double ansy[1000];
  ansx[0]=1.0;
  ansy[0]=0.0;

  for(int i=1;i<1000;i++){
    Point a, b, c;
    a.x=a.y=0.0;
    b.x=ansx[i-1];
    b.y=ansy[i-1];
    double t=atan(1.0/(b-a).abs());
    c.x=cos(t)*b.x-sin(t)*b.y;
    c.y=sin(t)*b.x+cos(t)*b.y;
    double tn=c.abs();
    double tmp=sqrt((b-a).abs()*(b-a).abs()+1);
    c.x=c.x/tn*tmp;
    c.y=c.y/tn*tmp;
    ansx[i]=c.x;
    ansy[i]=c.y;
    } 
  while(1){
    cin >> n;
    if(n==-1) break;
    printf("%.2f\n%.2f\n", ansx[n-1], ansy[n-1]);
  }
  return 0;
}