#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cmath>
#include <stack>
#include <cstring>
#include<complex>
using namespace std;

#define loop(i,a,b) for(int i = a; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
typedef complex<double> P;
int main(void){
  int n;
  while(cin>>n,n!=-1){
    P out(1,0);
    rep(i,n-1){
      P a(0,1);
      P t=out*a;
      t/=abs(t);
      out+=t;
    }
    printf("%.9f %.9f\n",real(out),imag(out));
  }
}