#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
	int n;
	while(cin >>n){
		if(n == -1){break;}
		double x = 0, y = 0, angle = 0;
		if(n>0){x = 1;n--;}
		while(n--){
			double xp = x,yp = y;
			x-=yp/sqrt(xp*xp+yp*yp);
			y+=xp/sqrt(xp*xp+yp*yp);
		}
		printf("%.2lf\n%.2lf\n",x,y);
	}
	return 0;
}