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;
#define rep(i,n) for(int i = 0;i<((int)(n));i++)
#define reg(i,a,b) for(int i = ((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i = ((int)(n)-1);i>=0;i--)
#define ireg(i,a,b) for(int i = ((int)(b));i>=((int)(a));i--)
typedef long long ll;

/*
*/

ll n,g;
vector<ll> prime,fact,a;
set<ll> ans;

void prime_list(ll n,vector<ll>& p){
	ll visited[300010]={};
	reg(i,2,n){
		if(visited[i]==0){
			p.push_back(i);
			reg(j,2,n){
				if(j*i>n)break;
				visited[i*j]=1;
			}
		}
	}
}
void factoring(ll n,vector<ll>& v,vector<ll>& p){
	rep(i,p.size()){
		while(n%p[i]==0){
			n/=p[i];
			v.push_back(p[i]);
		}
	}
	if(n>1)v.push_back(n);
}

long long gcd(long long a,long long b){
	if(b==0)return a;
	return gcd(b,a%b);
}

bool division(vector<ll> v,ll p){//ここは変更するのでコピーにしないといけない
	bool ok=true;
	rep(i,v.size())v[i]%=p;
	rep(i,v.size()){
		if(i+(p-1)>=v.size()-1)break;//最後は定数なので変えられない
		ll t=v[i];
		v[i]-=t;
		v[i+(p-1)]+=t;
	}
	rep(i,v.size())if(v[i]%p!=0)ok=false;
	return ok;
}

void init(){
	cin>>n;
	reg(i,0,n){
		ll b;
		cin>>b;
		a.push_back(b);
	}
	g=abs(a[0]);
	reg(i,1,n)g=gcd(g,abs(a[i]));
	prime_list(100010,prime);
	factoring(g,fact,prime);
	rep(i,fact.size())ans.insert(fact[i]);
	cerr<<"初期化終了"<<endl;
}

int main(void){
	init();
	rep(i,prime.size()){
		if(prime[i]>n)break;
		if(division(a,prime[i]))ans.insert(prime[i]);
	}
	for(auto itr=ans.begin();itr!=ans.end();itr++){
		cout<<*itr<<endl;
	}
	return 0;
}