require 'prime'
N=gets.to_i
A=(N+1).times.map{gets.to_i}
f = lambda{|x| (N+1).times.inject(0){|memo,i| memo+A[i]*x**(N-i)}}
ps= N.times.inject(f[-N/2]){|memo,i|memo.gcd(f[i-N/2])}
ps.prime_division.each{|k,i|p k}