def lscan; gets.split.map(&:to_i); end


S = gets.to_i
e9 = 1e9.to_i

if S < e9
  puts "0 0 0 #{S} 1 #{S}"
elsif S == e9*e9
  puts "0 0 0 #{e9} #{e9} 0"
else
  r = e9*e9 - S
  bd = r/e9+1
  a = r%e9
  b = e9-bd
  c = e9
  d = b+1
  puts "0 #{a} #{b} 0 #{d} #{c}"
end
