require 'prime'
S=gets.to_i

n = 10**9
if S == 10**18
    ret = [
        n,0,
        0,n,
        n,n,    
    ]
else
    q,r=S.divmod(10**9)
    ret = [
        0,0,
        1,q+1,
        n,n-r,    
    ]
end

puts ret.join(' ')