#include<cstdio>
#include<cmath>
using namespace std;
int main(void)
{
	int n,i;
	double x,y,x1,y1;
	while(1)	{
		scanf("%d",&n);
		if(n==-1)	break;
		x=1.0;	y=0.0;
		for(i=0;i<n-1;i++)	{
			x1=x-y/sqrt(x*x+y*y);
			y1=y+x/sqrt(x*x+y*y);
			x=x1;
			y=y1;
//			printf("%lf %lf\n",x,y);
		}
		printf("%.2lf\n",x);
		printf("%.2lf\n",y);
	}
	return 0;
}
