S = gets.to_i


x1 = 0
y1 = 0
x2 = 1E9
y2 = 1

x3 = 0
y3 = 0



if S == 1E18 then
    x3 = 0
    y3 = 1E9
    puts [x1,y1,x2.to_i,y2.to_i,x3.to_i,y3.to_i].join(" ")
    # p (x2*y3 - x3*y2)
    # p S

elsif S >= 1E9 then
    x3 = S%1E9
    y3 = S/1E9
    puts [x1,y1,x2.to_i,y2.to_i,x3.to_i,y3.to_i].join(" ")
    # p (x2*y3 - x3*y2)
    # p S
else
    x3 = S%1E9
    y3 = 0
    puts [x1,y1,x2.to_i,y2.to_i,x3.to_i,y3.to_i].join(" ")
    # p (x2*y3 - x3*y2).abs
    # p S
end 