#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;

  while (cin >> n, ~n) {
    double x = 1;
    double y = 0;

    for (int i = 1; i < n; ++i) {
      double dx = y;
      double dy = -x;
      double d = sqrt(dx * dx + dy * dy);

      x += dx / d;
      y += dy / d;
    }

    printf("%.3llf\n%.3llf\n", x, y);
  }
}