step = []
step[0] = [1.0, 0.0]
1000.times{|i|
  x, y = -step[-1][1], step[-1][0]
  r = Math.sqrt(x*x + y*y)
  step[i+1] = [step[i][0] + x/r, step[i][1] + y/r]
}

readlines.map(&:to_i).each{|i|
  break if i == -1
  puts step[i-1][0]
  puts step[i-1][1]
}