s=gets.to_i
#s==((x1―x3)*(y2-y3)-(x2-x3)*(y1-y3)).abs
s==(x2*y1-x1*y2).abs

(0..(s/2)).each do |i|
  (0..(s/2)).each do |j|
    if s==(x2*y1-x1*y2).abs
      puts "0 0 #{x1} #{y1} #{x2} #{y2}"
      break
    end
  end
end

