#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include <complex>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define ld long double
#define INF 1e+8
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end
using namespace std;
#define PI (acos(-1,p));
typedef pair<int, int> PA;
typedef complex<double>P;
int main(){
    double pi = acos(-1.0);
    int n ;
    while (true) {
        cin >> n; if(n == -1) break;
            P p(1,0);
            rep(i,n-1){
                P t = p;
                t*= P(0,1);
                t = t/abs(t);
                p =p+t;
            }
        printf("%f\n %f\n",p.real(),p.imag());
    }
    return 0;
}