#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
  int n;
  while(cin >>n,n!=-1){
    double x=0,y=0,xp=0,yp=-1;
    for(int i=0; i<n; i++){
      x+=-yp/sqrt(xp*xp+yp*yp);
      y+=xp/sqrt(xp*xp+yp*yp);;
      xp = x;
      yp = y;
    }
    printf("%.2lf\n%.2lf\n",x,y);
  }
  return 0;
}