require "prime"
#input of int(split by space)
def get_i()
  return gets.chomp.split(" ").map(&:to_i)
end
#input of float(split by space)
def get_f()
  return gets.chomp.split(" ").map(&:to_f)
end
#input of string(split by space)
def get()
  return gets.chomp.split(" ")
end
#input of string(split per one character)
def get_nsp()
  return gets.chomp.split("")
end
#yes or no decision
def yn_judge(bool,y="Yes",n="No")
  return bool ? y : n 
end
#create of array
def array(size1,init=nil,size2=-1)
  if size2==-1
      return Array.new(size1){init}
  else
      return Array.new(size2){Array.new(size1){init}}
  end
end

def max(a,b)
    return a>b ? a : b
end

def min(a,b)
    return a>b ? b : a
end

INF=Float::INFINITY

S=gets.to_i
if S<=10**9 or Prime.prime?(S)
    puts "0 0 0 1 #{S} 0"
    exit
end
temp=Prime.prime_division(S)
div=[]
temp.each do|a,b|
    b.times do
      div.push(a)
    end
end
ans=[]
ans.push(0)
ans.push(0)
ans.push(0)
y=1
i=0
while i<div.size and y*div[i]<=10**9
    y*=div[i]
    i+=1
end
ans.push(y)
x=1
i.upto(div.size-1) do|j|
    x*=div[j]
end
ans.push(x)
ans.push(0)
puts ans.join(" ")