#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;

int main(){
  int n;
  while(cin>>n){
    if(n==-1) break;
    double x = 1, y = 0;
    for(int i=1; i<n; i++){
      double rad = atan2(y,x) + M_PI/2;
      x += cos(rad);
      y += sin(rad);
    }
    printf("%.2f\n%.2f\n",x,y);
  }
  return 0;
}
