#include <cmath>
#include <iostream>

using namespace std;

int main() {
  while (true) {
    int n;
    cin >> n;
    if (n == -1)
      break;

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

    cout << x << endl;
    cout << y << endl;
  }
}
