import sys

for e in sys.stdin:

 n=int(e)

 if n<0:break

 z=1

 for _ in range(n-1):

  d=z*1j

  d/=abs(d)

  z+=d

 print(f'{z.real}\n{z.imag}')

import sys

for e in sys.stdin:

 n=int(e)

 if n<0:break

 z=1

 for _ in range(n-1):

  d=z*1j

  d/=abs(d)

  z+=d

 print((z.real))

 print((z.imag))

import sys

for e in sys.stdin:
    n = int(e)
    if n < 0:
        break
    z = 1
    for _ in range(n - 1):
        d = z * 1j
        d /= abs(d)
        z += d
    print(f"{z.real}\n{z.imag}")

import sys

for e in sys.stdin:
    n = int(e)
    if n < 0:
        break
    z = 1
    for _ in range(n - 1):
        d = z * 1j
        d /= abs(d)
        z += d
    print((z.real))
    print((z.imag))

-    print(f"{z.real}\n{z.imag}") +    print((z.real)) +    print((z.imag))