#!/usr/bin/ruby
# coding: utf-8

PI = Math.acos(-1)

$memo = [nil, [1.0, 0.0], [1.0, 1.0]]

def f(n)
  if $memo[n] != nil
    return $memo[n]
  end
  x, y = f(n-1)
  z = Math.sqrt(x**2 + y**2)
  [x - y/z, y + x/z]
end

while true
  n = gets.to_i
  if n < 0
    break
  else
    puts f(n)
  end
end