s = gets.chomp!.to_i
x = Math.sqrt(s).to_i + 1

x2 = x
y3 = x
diff = (x2 * y3) - s
if x > 10 ** 9
    x2 = 10 ** 9
    y3 = 10 ** 9
    diff = (x2 * y3) - s
end

if x2 * y3 == s
    puts "0 0 #{x2} 0 0 #{y3}"
else
    puts "0 0 #{x2} 1 #{diff} #{y3}"
end


