## main

n = gets.strip.to_i

ds = gets.strip.split(' ').map{|s| s.to_i}

gcd = ds.shift
for d in ds
  gcd = gcd.gcd(d)
end
#p gcd

dvs = []

k = 1
while k * k <= gcd
  if gcd % k == 0
    dvs << k
    k0 = gcd / k
    if k0 != k
      dvs << k0
    end
  end
  k += 1
end

puts dvs.sort