#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
	int n;
	while(scanf("%d",&n),n != -1){
		double x = 1.0, y = 1.0, sum = 0.0;
		double R = 1.0;
		for(int i = 0; i < n-1; i++){
			double q = sqrt(R*R+1);
			sum += acos((q*q+R*R-1)/(2*q*R));
			R = q;
      		x = R*cos(sum);
      		y = R*sin(sum);
		}
		
		printf("%.2lf %.2lf\n",x,y);
		
	}
	return 0;
}