#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == -1)
            return 0;

        double x = 1.0;
        double y = 0.0;
        while(--n > 0){
            double len = sqrt(x*x + y*y);
            double dx = -y / len;
            double dy = x / len;
            x += dx;
            y += dy;
        }

        printf("%.10f\n%.10f\n", x, y);
    }
}