#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    int n;
    while (cin >> n)
    {
        if (n == -1)
            break;
        double x = 1, y = 0;
        rep(i, n - 1)
        {
            double dis = sqrt(x * x + y * y);
            double a = -x / dis, b = -y / dis;
            double th = M_PI / 2;
            x = cos(-th) * a - sin(-th) * b + x;
            y = sin(-th) * a + cos(-th) * b + y;
        }

        printf("%.5f\n%.5f\n", x, y);
    }
    return 0;
}
