#include<iostream>
#include<cmath>

using namespace std;

#define NMAX 1000

const double PI=atan2(0.0,-1.0);

int main(){

	double ansx[NMAX+1],ansy[NMAX+1];
	double x,y;
	double sita;

	x=0,y=0;
	for(int i=1;i<=NMAX;i++){
		sita=atan2(y,x)+PI/2;
		x=x+cos(sita);
		y=y+sin(sita);
		ansx[i]=-1*x;
		ansy[i]=y;
	}

	int n;

	while(1){

		cin>>n;
		if(n==-1) break;
		cout<<ansy[n]<<endl;
		cout<<ansx[n]<<endl;

	}

}