def main(input = STDIN)
  while (n = input.gets.to_i) != -1
    cood = Complex(1, 0)
    (n - 1).times{cood = one_step(cood)}
    puts cood.rect.map{|i|i.to_f.round(2)}
  end
end
def one_step(cood)
  return Complex.polar(1, cood.phase + Math::PI / 2) + cood
end
main