#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<complex>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()

using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

#define MAX 1010

int main(){
  P p(1.0, 0.0);
  P r(0.0,-1.0);

  P ans[MAX];

  REP(i, MAX){
    P dir = -p;
    ans[i] = p;
    dir *= r;
    dir /= abs(dir);
    p += dir;
  }

  int n;
  while(scanf("%d",&n), n+1)
    printf("%.2f\n%.2f\n", ans[n-1].real(), ans[n-1].imag());

  return 0;
}