#include <iostream>
#include <cmath>
#define PI 3.14159265
using namespace std;

int main() {
  double x,y,theta;
  int n;
  while(cin >> n) {
    if(n == -1) break;
    x = 1.0;
    y = 0.0;
    theta = 0.0;
    for(int i=1;i<n;i++) {
      x -= cos((PI / 2) - theta);
      y += sin((PI / 2) - theta);
      theta = atan2(y,x);
    }
    printf("%.2lf\n",x);
    printf("%.2lf\n",y);
  }
}