#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#include <complex>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef complex<double> P;


// 点 a を中心に arg だけ回転する単位ベクトルを加算
P rot (P a, double arg )
{
	P r = P (cos(arg), sin(arg ));
	P res = a*r;
	res /= abs(res);

	return res + a;
}

int main()
{
//	cut here before submit 
//	freopen ("testcase.TH2", "r", stdin );
	while (1 ){
		P p = P(1.,0.);
		int n;
		scanf ("%d", &n );
		if (n == -1 ) break;
		while (--n ) p = rot (p, M_PI/2. );
		printf ("%.2lf %.2lf\n", p.real(), p.imag() );
	} // end loop
	
	return 0;
}