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

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

    double rad;
    double x = 0, y = 0;
    for(int i = 0; i < n; i++) {
      if(i == 0) rad = 0;
      else       rad -= M_PI/2;
      x += cos(rad);
      y += sin(rad);
      rad = atan2(-y, -x);
    }
    printf("%.2f\n%.2f\n", x, y);
  }
  return 0;
}