readlines.each do |l|
  n = l.to_i
  break if n==-1
  r = 1.0
  rad = 0.0
  (n-1).times do
    s = Math.sqrt(r**2 + 1)
    rad += Math.acos(r/s)
    r = s
  end
  puts [r*Math.cos(rad), r*Math.sin(rad)]
end