
n = gets.to_i
if n==1000000000000000000
  x1=0
  y1=0
  x2=0
  y2=1000000000
  x3=1000000000
  y3=0
  puts "#{x1} #{y1} #{x2} #{y2} #{x3} #{y3} "
  exit 0
end
xx=(10**9)
x1=0
y1=0
m=xx - (n % xx)
d= n/xx
x2=m
y2=d+1
x3=xx
y3=1
p
puts "#{x1} #{y1} #{x2} #{y2} #{x3} #{y3} "
