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

double R(int n);
double X(int n);
double Y(int n);

double R(int n) {
	return sqrt(X(n) * X(n) + Y(n) * Y(n));
}

double X(int n) {
	if(n == 2)	return 1.0;
	else		return (X(n - 1) -  Y(n - 1) / R(n - 1));
}

double Y(int n) {
	if(n == 2)	return 1.0;
	else		return (Y(n - 1) +  X(n - 1) / R(n - 1));
}

int main()
{
	int n;
	while(cin >> n, n != -1) {
		printf("%.2f\n%.2f\n", X(n), Y(n));
	}
	return 0;
}