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 double db;
typedef pair<ll,ll> P;
#define pb push_back
#define ft first
#define sd second
#define mp make_pair
#define fr(i,n) for(int i=0;i<(n);i++)
#define Fr(i,n) for(int i=0;i++<(n);)
#define ifr(i,n) for(int i=(n)-1;i>=0;i--)
#define iFr(i,n) for(int i=(n);i>0;i--)

template<class T>
T gcd(T n,T m){
    if(n>m) return gcd(m,n);
    else if(n==0) return m;
    else return gcd(m-n*(m/n),n);
}

int main(){
    ll n,x,a[10010],b[100010],q=0;
    cin>>n;
    ifr(i,n+1){
        cin>>a[i];
        q=gcd(q,abs(a[i]));
    }
    ll m=0,p[10010];
    bool B[10010]={};
    for(ll i=2;i*i<=n;i++) if(!B[i]) for(ll j=i*i;j<=n;j+=i) B[j]=1;
    for(ll i=2;i<=n;i++) if(!B[i]) p[m++]=i;
    fr(i,m){
        bool f=1;
        fr(j,n+1) b[j]=a[j];
        for (int j = n; j >= p[i]; --j) b[j-p[i]+1]+=b[j];
        fr(j,p[i]) if(b[j]%p[i]!=0) f=0;
        if(f) cout<<p[i]<<endl;
    }
    vector<ll> fcn;
    for(ll i=2;i*i<=q;i++){
        if(q%i==0){
            int cnt=0;
            while(q%i==0){
                cnt++;
                q/=i;
            }
            fcn.pb(i);
        }
    }
    if(q>1) fcn.pb(q);
    fr(i,fcn.size()) if(fcn[i]>n) cout<<fcn[i]<<endl;
}