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

using namespace std;

double x;
double y;

int main(void){
	while(1){
		x=1,y=0;
		int n;
		cin >> n;
		if(n==-1)break;
		for(int i=1;i<n;i++){
			double dx=-y/sqrt(x*x+y*y);
			double dy=x/sqrt(x*x+y*y);
			x+=dx;
			y+=dy;
		}
		printf("%0.5f\n%0.5f\n",x,y);
	}
    return 0;
}