//46
#include<iostream>
#include<complex>

using namespace std;

int main(){
  complex<double> p[1000];
  p[0]=complex<double>(1,1);
  for(int i=1;i<1000;i++){
    p[i]=p[i-1]-p[i-1]*complex<double>(0,-1)/abs(p[i-1]);
  }
  for(int n;cin>>n,n!=-1;){
    cout<<p[n-2].real()<<endl<<p[n-2].imag()<<endl;
  }
  return 0;
}
    