#include<iostream>
#include<complex>
#include<cmath>
#include<cstdio>
using namespace std;
typedef complex<double> P;
int main(){
	int n;
	double co,si,x,y,z;
	//co=z/x si=y/x
	//x=co*x-si*y
	//y=si*x+co*y

	while(cin>>n,n!=-1){
		n--;	P a=P(1,0);
		while(n-->0){
			z=sqrt(imag(a)*imag(a)+real(a)*real(a));
			x=sqrt(1+z*z);
			co=z/x;
			si=1/x;
			a=P(co*real(a)-si*imag(a),si*real(a)+co*imag(a));
			a/=abs(a);
			a*=x;
		}
		printf("%.2lf\n%.2lf\n",real(a),imag(a));
	}
	return 0;
}