import std.stdio,std.string,std.conv,std.math;

double memo[1001][2];

void calc()
{
	memo[0][0] = 1;
	memo[0][1] = 0;
	double angle = 0;

	foreach(i;1..7)
	{
		double r = sqrt(1.0+i);
		angle += asin(1.0/r);
		memo[i][0] = r * cos(angle);
		memo[i][1] = r * sin(angle);
	}
}

int main()
{
	int n;
	calc();
	while((n = readln.chomp.to!int) != -1)
	{
		writefln("%.2f",memo[n-1][0]);
		writefln("%.2f",memo[n-1][1]);
	}

	return 0;
}