#include <iostream>
#include <cmath>
#include <cstdio>

using namespace std;

int main(){
        int n;
        cin >> n;
        while(n > 0){ 
                double x[2] = {1,0};
                while(--n){
                        double _x[2] = {-x[1],x[0]};
                        for(int i = 0; i < 2; i++){
                                _x[i] /= pow(x[0]*x[0]+x[1]*x[1],0.5);
                        }   
                        for(int i = 0; i < 2; i++){
                                x[i] += _x[i];
                        }   
                }   
                printf("%.2f\n%.2f\n",x[0],x[1]);
                cin >> n;
        }   
}