#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>

using namespace std;

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,s,e) for(int i=(s); i<(e); i++)
#define pb(n) push_back((n))
#define mp(n,m) make_pair((n),(m))
#define all(r) r.begin(),r.end()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;




int main(){
	int n;
	while (cin >> n){
		if (n == -1)break;
		double x = 1.0, y = 0.0;
		rep(i, n - 1){
			double a = x, b = y;
			x = sqrt(x*x + y*y);
			y = 1.0;
			double c = x, d = y;
			x = (a*c - b*d) / sqrt(a*a + b*b);
			y = (a*d + c*b) / sqrt(a*a + b*b);
		}
		printf("%.15lf\n%.15lf\n", x, y);
	}
}