#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
  double x,y;
  double dx,dy;
  double len;
  int n;
  while( cin >> n ){
    if(n == -1)break;
  n--;
  x = 1;
  y = 0;
  while(n--){
    dx = -y;
    dy = x;
    len = sqrt(pow(x,2) + pow(y,2));
    x+=dx/len;
    y+=dy/len;
  }
  printf("%.2f\n%.2f\n",x,y);
  }
  return 0;
}