#include<iostream>
#include<vector>
#include<cmath>
#include<cstdio>

#define F first
#define S second
using namespace std;

typedef pair<double,double> P;
const int MAX = 1005;
P ans[MAX];

int main(){


  ans[0] = P(1,0);
  ans[1] = P(1,1);

  double theta = 0;

  for(int i = 2; i < MAX; i++){
    double len = ans[i-2].F*ans[i-2].F+ans[i-2].S*ans[i-2].S;
    theta += atan(1.0/sqrt(len));
    //   cout << i << " " << sqrt(len) << endl;
    ans[i] = P(ans[i-1].F-sin(theta), ans[i-1].S+cos(theta));
    // cout << theta << " " << sin(theta) << endl;
    //  ans[i] = rotate(ans[i-1],theta);
  }

  int n;
  while(cin >> n && n != -1) printf("%.2f\n %.2f\n",ans[n-1].F,ans[n-1].S);
  return 0;
}