s = gets.chomp.to_i

x_1 = 0
x_2 = 1
x_3 = 1

y_1 = 0
y_2 = 1
y_3 = s + 1

if s > 10**9
  #sの桁数を調べる
  s_size = s.to_s.length
  y_3 = 10**9
  x_2 = s.to_s[0, s_size - 9].to_i
  x_2 += 1 if x_2 != 10 **9
  x_3 = x_2 * y_3 - s
end
print("#{x_1} #{y_1} #{x_2} #{y_2} #{x_3} #{y_3}\n")