#include<iostream>
#include<algorithm>
#include<math.h>
#include<iomanip>
using namespace std;
int main(){
	int n;
	while(cin>>n&&n!=-1){
		double a=1.0,b=1.0,t,c,d;n-=2;
		while(n--){
			t=1.0/(a*a+b*b);
			t=(double)sqrt((double)t);
			c=a-b*t,d=b+a*t;
			a=c,b=d;
		}
		cout<<fixed<<setprecision(10)<<a<<endl;
		cout<<fixed<<setprecision(10)<<b<<endl;
	}
	return 0;
}