#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(2);
  
  int n;
  while (cin >> n, n != -1) {
    double x = 1, y = 0;
    for (int i = 0; i < n - 1; i++) {
      double t = atan2(y, x);
      x -= sin(t);
      y += cos(t);
    }
    cout << x << endl;
    cout << y << endl;
  }

  return 0;
}
