#include <cstdio>
#include <complex>
using namespace std;

typedef complex<double> Point;

#define X real()
#define Y imag()

int n;
Point ans[2001];

int main() {
  ans[0] = Point(1, 0);
  for (int i=0; i<2000; i++) {
    Point d = -ans[i]/Point(0, 1);
    ans[i+1] = ans[i] + d/sqrt(norm(d));
  }

  while (1) {
    scanf("%d", &n);
    if (n == -1) return 0;
    printf("%f\n%f\n", ans[n-1].X, ans[n-1].Y);
  }
}