#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
  int n;
  double x, y, theta;

  cout.setf(ios::fixed);
  while (1) {
    cin >> n;
    if (n==-1) break;
    x = 1.0;
    y = 0.0;
    for (int i=1; i<n; i++) {
      theta = atan2(y, x);
      x -= sin(theta);
      y += cos(theta);
    }
    cout << setprecision(2) << x << endl;
    cout << setprecision(2) << y << endl;
  }
}