#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main(){
	while(1){
	int n ; cin >> n ; if(n==-1) break;
	double x,y,lenA,lenB;	double ca,sa;
	double* Sn=new double[n+1]; double* Cn=new double[n+1] ;
	for(int i=2;i<=n;i++){
	lenA=sqrt((double)i); lenB=sqrt((double)i-1);
	Sn[i]=1/lenA ; Cn[i]=lenB/lenA ;
	};
	ca=1/sqrt((double)2) ; sa=1/sqrt((double)2);
	for(int i=3;i<=n;i++){
	double temp=Cn[i]*ca-Sn[i]*sa;
	sa=Sn[i]*ca+Cn[i]*sa;
	ca=temp;
	};
	if(n==1) x=1,y=0;
	else if(n==2) x=1,y=1;
	else x=sqrt((double)n)*ca, y=sqrt((double)n)*sa ;
	cout << fixed << setprecision(2);
	cout << x << '\n' << y << '\n' ;
	};
}