#include<iostream>
#include<iomanip>
#include<cmath>

using namespace std;
int main()
{
  
  int n;
  for(;cin>>n,n!=-1;)
    {
      double x=1,y=1;   
      n-=2;
      for(;n--;)
	{
	  double X=-y,Y=x,d=sqrt(x*x+y*y);
	  x+=X/d;
	  y+=Y/d;    
	}
      cout<<fixed<<setprecision(2)<<x<<endl<<y<<endl;
    }
}