while true
  n = gets.chomp.to_i
  break if n == -1

  x = 1.0
  y = 0.0

  (n - 1).times do
    th = Math.atan2(y, x) + Math::PI * 0.5
    x += Math.cos(th)
    y += Math.sin(th)
  end

  printf("%.2f\n", x)
  printf("%.2f\n", y)
end