local s=io.read("*n")
local h=1
local w=s

for i=2,math.sqrt(math.sqrt(s)) do
    if w%i==0 then
        while w%i==0 do
            w=w//i
            h=h*i
        end
    end
end
print(0,0,0,h,w,0)