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

using namespace std;

int main(){
	while(1){
		int a;
		cin>>a;
		
		if(a==-1)break;
		
		
		double x = 1;
		double y = 1;
		
		for(int i=0;i<a-2;i++){
			double len = sqrt(x*x + y*y);
			
			double dx = x / len;
			double dy = y / len;
			
			double nx = -dy;
			double ny = dx;
			
			x += nx;
			y += ny;
			
			
		}
		printf("%lf\n%lf\n",x,y);
	}
	
	
}