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 unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcountll

#define INF 1e16
#define mod 1000000007

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

ll n;
ll a[100010];
bool isprime[100010];
vector<ll> cs;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin>>n;
  rep(i,n+1){
    cin>>a[i];
  }

  ll m=abs(a[0]);
  map<ll,ll> ps=prime_factor(m);
  for(P p : ps)cs.push_back(p.fi);

  rep(i,n+2)isprime[i]=true;
  for(ll i=2;i<=n+1;i++){
    if(!isprime[i])continue;
    cs.push_back(i);
    for(ll j=i*2;j<=n+1;j+=i)isprime[j]=false;
  }

  sort(all(cs)); uni(cs);

  rep(i,cs.size()){
    if((ll)abs(a[n])%cs[i]!=0)continue;

    vector<ll> b(min(cs[i]-1,n+1),0);
    rep(j,n+1){
      (b[j%(cs[i]-1)]+=a[j])%=cs[i];
    }
    bool ok=true;
    rep(j,min(n+1,cs[i]-1))if(b[j]!=0)ok=false;
    if(ok)cout<<cs[i]<<endl;
  }

  return 0;
}
