#define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<queue>
#include<map>
#include<set>
#include<vector>
#include<list>
#include<stack>
#include<cstring>
#include<string>
#include<cmath>
using namespace std;

struct Point{
	double x,y;
	Point(){}
	Point(double _x,double _y){
		x=_x; y=_y;
	}
};

int main(){
	Point ans[1001]={};
	ans[1] = Point(1,0);
	for(int i=2;i<=1000;i++){
		double r = atan2(-ans[i-1].y,-ans[i-1].x);
		r += -1.0/2.0*M_PI;
		ans[i] = Point(ans[i-1].x+cos(r),ans[i-1].y+sin(r));
	}
	int N;
	while(cin>>N,~N){
		printf("%lf\n%lf\n",ans[N].x,ans[N].y);
	}
}