You are given a polynomial of degree N with integer coefficients: f(x)=a_Nx^N+a_{N-1}x^{N-1}+...+a_0. Find all prime numbers p that divide f(x) for every integer x.

Constraints

* 0 \leq N \leq 10^4
* |a_i| \leq 10^9(0\leq i\leq N)
* a_N \neq 0
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N
a_N
:
a_0


Output

Print all prime numbers p that divide f(x) for every integer x, in ascending order.

Examples

Input

2
7
-7
14


Output

2
7


Input

3
1
4
1
5


Output




Input

0
998244353


Output

998244353
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define fi first
#define se second
#define mp make_pair
typedef pair<int,int> P;
#define REP(i,x,y) for(int i=x;i<=y;i++)
#define abs(x) ((x)>0?(x):-(x))
const int maxn = 10006, inf = 0x3f3f3f3f;
int n;
int a[maxn];
int gcd(int a,int b){
	if(a<b) swap(a,b);
	if(!b) return a;
	return gcd(b,a%b);
}
vector<int> isp(maxn,-1);
void init(){
	isp[0]=isp[1]=0;
	for(int i=2;i<maxn;i++){
		if(isp[i]){
			for(int j=2;j*i<maxn;j++) isp[i*j]=0;
		}
	}
}
set<int> ans;
ll cal(ll i,ll p){
	ll ans=0;
	for(int j=0;j<=n;j++){
		ans = 1LL * ans * i % p + a[j];
		ans %= p;
	}
	return ans;
}
void div(int p){
	int b[maxn];
	for(int i=0;i<n;i++){
		b[i]=a[i];
		a[i+1]+=a[i]*p;
	}
	for(int i=0;i<n;i++) a[i]=b[i];
	n--;
}
int main(){
	init();
	cin>>n;
	for(int i=0;i<=n;i++) cin>>a[i];
	int d=abs(a[0]);
	for(int i=1;i<=n;i++) d=gcd(d,abs(a[i]));
	int dd=d;
	for(int i=2;i<=d&&i<maxn;i++){
		if(isp[i]&&!ans.count(i)&&d%i==0) {
			ans.insert(i);
			d/=i;
		}
	}
	if(d>1) ans.insert(d);
	for(int i=0;i<=n;i++) a[i]/=dd;
	int tot=1;
	for(int i=0;i<isp.size();i++){if(!isp[i]) continue;
		int p=i;
		int fl=0;
		if(p>100){
			for(int j=0;j<100;j++){
				int k=rand()%p;
				if(cal(k,p)){
					fl=1;
					break;
				}
			}
		}else{
			for(int j=0;j<p;j++){
				if(cal(j,p))
				{
					fl=1;
					break;
				}
			}
		}
		if(!fl && !ans.count(p)) {
			ans.insert(p);
			//div(p);
//			for(int i=0;i<=n;i++){
//				cout<<a[i]<<' ';
//			}
//			cout<<endl;
		}
	}
	for(auto p:ans) cout<<p<<endl;
	return 0;
}
