#include<iostream>
#include<cmath>
#include<cstdio>

struct Vector{
	double x, y;
};

Vector plus(Vector a, Vector b){
	return {a.x+b.x, a.y+b.y};
}

Vector times(Vector v, double c){
	return {c*v.x, c*v.y};
}

Vector getNormalVector(Vector v){
	return {-v.y, v.x};
}

double distance(Vector v){
	return sqrt(v.x*v.x+v.y*v.y);
}

int main(){
	Vector vs[1001];
	vs[2] = {1, 1};
	for(int i=3;i<1001;i++){
		Vector v = vs[i-1], nv = getNormalVector(v);
		nv = times(nv, 1.0/distance(nv));
		vs[i] = plus(v, nv);
	}
	
	int n;
	while(std::cin >> n, ~n){
		printf("%.2f\n%.2f\n", vs[n].x, vs[n].y);
	}
}