def f(x,y):
    d=(x*x+y*y)**0.5
    return -y/d,x/d
while True:
    n=input()
    if n==-1:
        break
    x,y=1.0,0
    for i in xrange(n-1):
        dx,dy=f(x,y)
        x,y=x+dx,y+dy
    print x,y