#include <cstdio>
#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
  int n;
  double x,y;
  while(1){
    cin >> n;
    if(n == -1)break;
    x = 1;
    y = 1;
    for(int i = 2; i < n; i++){
      double ang = M_PI/2 - atan2(-y,x);
      //cout << ang/M_PI*360 <<endl;
      x += cos(ang);
      y += sin(ang);
    }
    cout << x << endl;
    cout << y << endl;
  }
}