s = gets.to_i

x_1 = 0
y_1 = 0
x_2 = 1
y_2 = 0
x_3 = 0
y_3 = s

if s > 10**9
  tmp = s/2+1
  while tmp > 0 do
    if s%tmp == 0
      x_2 = tmp
      y_3 = s/tmp
      if y_3 <= 10**9
        break
      end
    end
    tmp -= 1
  end
end
  
puts "#{x_1} #{y_1} #{x_2} #{y_2} #{x_3} #{y_3}"