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>
#define rep(i, a, b) for(ll i = ll(a); i < ll(b); i++)
#define rer(i, a, b) for(ll i = ll(a) - 1; i >= ll(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

const ll MOD=1000000007;
int prime[10000]; //i番目の素数
bool is_prime[10000+1];  //iが素数ならtrue

//n以下の素数の数を返す
int sieve(ll n){
    ll p = 0;
    rep(i,0,n+1) is_prime[i]=true;
    is_prime[0]=is_prime[1]=false;
    rep(i,2,n+1){
        if (is_prime[i]){
            p++;
            prime[p]=i;
            for (int j=2*i; j<=n; j+=i) is_prime[j]=false;
        }
    }
    return p;
}
ll gcd (ll a, ll b){
    if (b==0) return a;
    return gcd(b, a%b);
}
set<ll> ans; //素因数
void prime_factor(ll n){
    for (ll i=2; i*i<=n; i++){
        while(n%i==0){
            ans.insert(i);
            n/=i;
        }
    }
    if (n!=1){
        ans.insert(n);
    }
}
int N;
bool div(vector<ll> a, ll p){
    rer(i,N-p+1,0){
        a[i+1]+=a[i+p];
        a[i+1]%=p;
        a[i+p]=0;
    }
    rep(i,0,p){
        a[i]%=p;
    }
    vector<ll> v(N+1,0);
    if(v==a) return true;
    else return false;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>N;
    vector<ll> A(N+1,0);
    cin>>A[N];
    ll g=A[N];
    rep(i,1,N+1){
        cin>>A[N-i];
        g=gcd(g,A[N-i]);
    }
    prime_factor(abs(g));
    int k=sieve(N);
    rep(x,1,k+1){
        ll p=prime[x];
        if(div(A,p)) ans.insert(p);
    }
    for(ll t : ans){
        cout <<t<<"\n";
    }
}