#include <bits/stdc++.h>
#define RADIAN(num) M_PI*(num/180.0)
using namespace std;
typedef complex<double> P;

int n;
P s = P(1, 0);

void exec() {
    double len = abs(s);
    P normalLine = s * P(0, 1);
    normalLine = P(normalLine.real()/len, normalLine.imag()/len);
    s = P(s.real()+normalLine.real(), s.imag()+normalLine.imag());
}

void solve() {
    for(int r = 0; r < n; r++) {
        exec();
    }
}

int main(void) {
    while(cin >> n, n != -1) {
        n--; //処理を行う回数と考える
        solve();
        printf("%.2f\n%.2f\n", s.real(), s.imag());
        s = P(1, 0);
    }
    return(0);
}