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;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using Map = map<ll,ll>;
using T = tuple<ll,ll,ll>;
using vvl = vector<vector<ll>>;
#define all(v) v.begin(), v.end()
#define print(v) cout<<v<<endl;
#define fi(v) get<0>(v)
#define se(v) get<1>(v)
#define th(v) get<2>(v)
template <typename T> bool chmax(T &a, const T &b){if (a<b){a=b;return 1;}return 0;}
template <typename T> bool chmin(T &a, const T &b){if (a>b){a=b;return 1;}return 0;}
const ll INF=1LL<<60;
const ll MOD=1000000007;

ll gcd(ll a,ll b) {
    while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
    }
    return a;
}

map<ll, ll> prime_factor(ll n) {
  map< ll, ll > ret;
  for(ll i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}

vector<ll> Eratosthenes( const ll N )
{
    std::vector<bool> is_prime( N + 1 );
    for( ll i = 0; i <= N; i++ )
    {
        is_prime[ i ] = true;
    }
    std::vector<ll> P;
    for( ll i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( ll j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}
int main(){
    ll N;
    cin >> N;
    vector<ll> A(N+1,0);
    for(ll i=0;i<N+1;i++)cin>>A[N-i];
    vl E=Eratosthenes(10001);
    ll e=E.size();
    set<ll>ans;
    for(ll i=0;i<e&&E[i]<=N;i++){
        ll p=E[i];
        vl B=A;
        if(A[0]%p!=0)continue;
        for(ll k=N;k>=p-1;k--){
            B[k-p+1]+=B[k];
            B[k]=0;
        }
        bool check=0;
        for(ll k=0;k<=N;k++){
            ll x=B[k];
            if(x%p!=0){check=1;break;}
        }
        if(!check)ans.insert(p);
    }

    ll L=abs(A[0]);
    for(ll i=1;i<=N;i++)L=gcd(L,abs(A[i]));
    Map M=prime_factor(L);
    for(auto p: M)ans.insert(p.first);
    for(auto p: ans)print(p)

    return 0;
}
