#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<vector>
#include<complex>
using namespace std;

typedef complex< double > Pt;

int main(){
  int n;
  while(cin >> n, ~n){
    Pt now(1,0);
    double angle;
    for(int i = 1 ; i < n ; i++ ){
      angle = arg(now); //角度出したいね
      now.imag() += cos(angle);
      now.real() -= sin(angle);
    }
    cout << now.real() << " " << now.imag() << endl;
  }
}