#include <stdio.h>
#include <math.h>
#include <vector>
#include <iostream>
using namespace std;

int main(void) {
	vector<double> r;
	int n;
	while (true)
	{
		cin >> n;
		if (n==-1){break;}
		double x=1,y=0,s=0,c=0;
		for (int i=1; i<n; i++)
		{
			if(x!=0)
			{
				s = y/(sqrt(x*x+y*y));
				c = x/(sqrt(x*x+y*y));
				x -= s;
				y += c;
			} else {
				if (y>=0)
				{
					x -= 1;
				} else {
					x += 1;
				}
			}
		}
		r.push_back(x);
		r.push_back(y);
	}
	for(int i=0; i<r.size(); i++)
	{
		cout << r[i] << endl;
	}
	return 0;
}