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>
typedef long long ll;
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)
using namespace std;
const ll MAX_N=1e4;
ll N,a[MAX_N+1],b[MAX_N];
ll gcd(ll a,ll b){
	if(b==0)return a;
	return gcd(b,a%b);
}
bool isprime[MAX_N+1];
void era(){
	memset(isprime,true,sizeof(isprime));
	isprime[0]=isprime[1]=false;
	FOR(i,2,N+1){
		if(isprime[i]){
			for(ll j=i*2;j<=N;j+=i){
				isprime[j]=false;
			}
		}
	}
}
bool prime(ll x){
	if(x==1)return false;
	for(ll i=2;i*i<=x;i++){
		if(x%i==0)return false;
	}
	return true;
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>N;
	REP(i,N+1)cin>>a[N-i];
	era();
	set<ll> ans;
	FOR(p,2,N+1){
		if(!isprime[p])continue;
		memset(b,0,sizeof(b));
		b[0]=a[0];
		REP(i,N){
			b[i%(p-1)+1]+=a[i+1];
		}
		bool flg=true;
		REP(i,p){
			if(b[i]%p!=0)flg=false;
		}
		if(flg){
			ans.insert(p);
		}
	}
	ll g=a[0];
	REP(i,N)g=gcd(g,abs(a[i+1]));
	for(ll i=1;i*i<=g;i++){
		if(g%i==0){
			if(prime(i)){
				ans.insert(i);
			}
			if(prime(g/i)){
				ans.insert(g/i);
			}
		}
	}
	for(auto i:ans){
		cout<<i<<endl;
	}
}