#include <stdio.h>
#include <math.h>

#define MAX 1001

void normalize(double *x, double *y){
	double z;
	z = sqrt((*x)*(*x)+(*y)*(*y));
	*x /= z;
	*y /= z;
}

int main(void){
	double x[MAX];
	double y[MAX];
	double vx,vy;
	int q;
	
	x[0] = y[0] = 0;
	x[1] = 1; y[1] = 0;
	for (int i=2; i<MAX; i++){
		vx = -y[i-1]; vy = x[i-1];
		normalize(&vx,&vy);
		x[i] = x[i-1] + vx;
		y[i] = y[i-1] + vy;
//		printf ("%d:(%f, %f)\n", i, x[i], y[i]);
	}
	
	while (scanf("%d",&q), q!=-1){
		printf("%.2f\n%.2f\n",x[q],y[q]);
	}
	return 0;
}