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

int main(void){
  int n;
  while(cin >> n && n != -1){
    double x = 1.0, y = 0.0;
    for(int i = 1; i < n; i++){
      double newx, newy;
      newy = x / sqrt(x * x + y * y);
      newx = -y / sqrt(x * x + y * y);
      x += newx; y += newy;
    }
    printf("%.2f\n", x);
    printf("%.2f\n", y);
  }
  return 0;
}