#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cmath>
using namespace std;

int main()
{
    int n;
    while(cin >> n)
    {
        if(n==-1)break;
        double x=1.0,y = 0.0;
        double vx=0,vy=1;
        double idox = -1;
        double idoy = 0;
        while(--n)
        {
            //turn
            idox = -x / fabs(sqrt((x*x) + (y*y)));
            idoy = -y / fabs(sqrt((x*x) + (y*y)));
            vx = idoy;
            vy = -idox;

            //cout << vx << ","<<vy << endl;
            //move
            x += vx;
            y += vy;
        }
        printf("%.2f\n%.2f\n",x,y);
    }
    return 0;
}