#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <climits>
#include <cfloat>

using namespace std;

const double PI = 4*atan(1.0);

int main()
{
	while (true)
	{
		int n;
		scanf("%d", &n);
		if (n == -1)
			break;

		double x = 1;
		double y = 0;
		for (int i = 1; i < n; ++i)
		{
			double angle = atan(y/x) + (x >= 0 ? 1 : -1)*PI/2;
			x += cos(angle);
			y += sin(angle);
		}
		printf("%.2f\n%.2f\n", x, y);
	}

	return 0;
}