#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef pair<double,double> P;
typedef complex<double> CP;
typedef long long ll;

int n;
double x,y;
double co=1;
double si;
int main(){
	while(cin>>n,n!=-1){
		n--;
		x=1.0; y=0.0;
		co=1;
		rep(i,n){
			double co1;
			double dist1=sqrt(x*x+y*y);
			double dist2=sqrt(1+x*x+y*y);
			co1=dist1/dist2;
			co=cos(acos(co1)+acos(co));
			x=dist2*co;
			si=sqrt(1-co*co);
			y=dist2*si;
			//cout<<dist1<<" "<<dist2<<" "<<co<<" "<<si<<" x "<<x<<" y "<<y<<endl;
		}
		printf("%.2f\n%.2f\n",x,y);
		//cout<<x<<endl<<y<<endl;
	}
	return 0;
}