#include <iostream>
#include <vector>
#include <algorithm>
#include <complex>

using namespace std;

typedef complex<double> P;

int main(){

	pair<double,double> ret[1001];
	
	double cx,cy;
	cx=1,cy=0;
	ret[1].first=cy,ret[1].second=cx;
	for(int i = 2; i < 1001; i++){
		complex<double> cv=complex<double>(cx,cy);
		// äËÌÊu©ç»ÝÌÊuÖÌPÊ@üxNg
		P nve = P(-cy,cx)/abs(P(-cy,cx));
		double ny=nve.imag()+cy;
		double nx=nve.real()+cx;
		cx=nx;
		cy=ny;
		ret[i].first=cy,ret[i].second=cx;
	}
	int n;
	while(cin>>n&&n!=-1){
		cout<<ret[n].second<<endl;
		cout<<ret[n].first<<endl;
	}

	return 0;
}