#include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin(); it!=(c).end(); it++)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define pr(a) cout << (a) << endl
typedef long long ll;
typedef pair<double,double> P;
const int MAX=1000000000;
int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

int main() {
  P d[1001];
  d[1].first=0,d[1].second=0;
  double r=0;
  for(int i=1; i<1001; i++) {
    d[i].first=d[i-1].first+cos(r);
    d[i].second=d[i-1].second+sin(r);
    r=atan2(-d[i].second,-d[i].first)-M_PI/2;
  }
  int n;
  while(cin >> n && n!=-1) {
    printf("%.2f\n",d[n].first);
    printf("%.2f\n",d[n].second);
  }			   
  return 0;
}
