#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#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 long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
double ans[1010][2];
int main()
{
	ans[2][0]=1.00,ans[2][1]=1.00;
	for(int i=3;i<1001;i++)
	{
		ans[i][0]=ans[i-1][0]+1.00/hypot(ans[i-1][0],ans[i-1][1])*(-ans[i-1][1]);
		ans[i][1]=ans[i-1][1]+1.00/hypot(ans[i-1][0],ans[i-1][1])*(ans[i-1][0]);
	}
	while(1)
	{
		int k;
		cin >> k;
		if(k==-1)break;
		/*cout << ans[k][0] << endl;
		cout << ans[k][1] << endl;*/
		printf("%.2f\n%.2f\n",ans[k][0],ans[k][1]);
	}
	return 0;
}