import std.stdio;
import std.algorithm;
import std.string;
import std.functional;
import std.array;
import std.conv;
import std.math;

void main(){
    while(true){
	auto s = readln();
	if(stdin.eof()) break;
	int n = to!int(chomp(s));
	if(n==-1)break;
	real x,y;
	real vecx,vecy;
	real angle;
	x = 1.0;
	y = 0.0;
	real r = sqrt(x * x + y * y);
	vecy =  x / r;
	vecx = 1 * y / r;
	for(int i=0;i<n-1;i++){
	    x += vecx;
	    y += vecy;
	    r = sqrt(x * x + y * y);
	    vecy =  x / r;
	    vecx = -1 * y / r;
	}
	writeln(x);
	writeln(y);
    }
}