#include <iostream>
#include <math.h>
#include <stdio.h>
#include <cstdio>
using namespace std;
int main(){
	while(1){
		int n;
		cin>>n;
		if(n==-1) break;
		double x,y,s=0,c=1;
		for(int i=2;i<=n;i++){
			double a=1/sqrt((double)i),b=sqrt((double)(i-1)/(double)i),d=s;
			s = s*b+c*a;
			c = c*b-d*a;
		}
		x = sqrt((double)n)*c;
		y = sqrt((double)n)*s;
		printf("%.2lf\n%.2lf\n",x,y);
	}
	return 0;
}