#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
double num[1005][2];
int main(){
	num[2][0]=1.0;
	num[2][1]=1.0;
	for(int i=3;i<=1000;i++){
		double x,y;
		x=num[i-1][0];
		y=num[i-1][1];
		double t=sqrt(x*x+y*y);
		double w=-1.0*y/t+x;
		double p=y+1.0*x/t;
		num[i][0]=w;
		num[i][1]=p;
	}
	int n;
	while(scanf("%d",&n) && n!=-1){
		printf("%.2f\n%.2f\n",num[n][0],num[n][1]);
	}
}