#include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int n,i;

  while(1){
    cin>>n;
    if(n<0)break;
    double x=1.0,y=1.0;

    rep(i,n-2){
      double sita=atan(x/y);
      x-=cos(sita);
      y+=sin(sita);
    }
    cout<<x<<endl;
    cout<<y<<endl;
  }
}