#include<iostream>
#include<iomanip>
#include<cmath>
#include<cstdio>
using namespace std;

int main(){
	int i, n;
	double x, y, rad, turn;
	turn = -0.5 * M_PI;
	while(true){
		cin >> n; if(n == -1) break;
		x = 1.0;
		y = 0.0;
		rad = M_PI;
		for(i=2; i<=n; i++){
			rad = rad + turn;
			x += cos(rad);
			y += sin(rad);
			rad = atan2(y, x);
		}
		cout << fixed << setprecision(2);
		cout<<y<<endl<<x<<endl;
	}
	return 0;
}