#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

double dis(double x,double y){
  return sqrt(x*x+y*y);
}

int main(){
  int n;

  while(cin >> n , n != -1){
    double x = 1.0,y = 0.0;
    for(int i = 0 ; i < n-1 ; i++){
      double nx = -y / dis(x,y);
      double ny = x / dis(x,y); 
      x += nx;
      y += ny;
    }
    printf("%.5f %.5f\n" ,x ,y);
  }

  return 0;
}