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<iostream>
#include<algorithm>
#include<climits>
#include<vector>
#include<utility>//pair
#include<cmath>//abs,sqrt
#include<cstring>
#include<map>
#include<set>
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep1(i,n) for(ll i=1;i<=n;i++)
#define prin(arg) cout<<arg<<"\n"
#define prin2(arg1,arg2) cout<<arg1<<" "<<arg2<<"\n"
#define fill(arg,n) memset(arg,n,sizeof(arg))
using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
const int INF=1e+9;
const ll INFLL=1e+17;
int n;
ll a[10010];
ll gcd(ll x,ll y){//最大公約数
  if(x<0) x=-x;
  if(y<0) y=-y;
  if(y==0) return x;
  else return gcd(y,x%y);
}
bool prime[10010];
vector<ll> sieve(ll x){//エラストテネスの篩
  prime[0]=prime[1]=false;
  for(ll i=2;i<=x;i++) prime[i]=true;
  vector<ll> res;
  for(ll i=2;i<=x;i++){
    if(prime[i]){
      res.push_back(i);
      ll b=i;
      while(b<=x){
	prime[b]=false;
	b+=i;
      }
    }
  }
  return res;
}
map<ll,int> prime_factor(ll x){
  map<ll,int> res;
  for(ll i=2;i*i<=x;i++){
    while(x%i==0){
      res[i]++;
      x/=i;
    }
  }
  if(x!=1) res[x]=1;
  return res;
}

void solve(){
  set<ll> res;
  ll g=0;
  rep(i,n+1){
    g=gcd(g,a[i]);
  }
  map<ll,int> m=prime_factor(g);
  for(auto ite=m.begin();ite!=m.end();ite++){
    res.insert(ite->first);
  }
  vector<ll> pr=sieve(n);
  int ps=pr.size();
  rep(i,ps){
    ll p=pr[i];
    ll box[p+1];
    fill(box,0);
    box[0]=a[0];
    rep1(i,n){
      ll r=i%(p-1);
      if(r==0) r=p-1;
      box[r]+=a[i];
    }
    bool f=true;
    rep(i,p){
      if(box[i]%p!=0){
	f=false;
	break;
      }
    }
    if(f) res.insert(p);
  }
  for(auto ite=res.begin();ite!=res.end();ite++){
    prin(*ite);
  }
}
void reverse(){
  rep(i,(n+1)/2){
    ll temp=a[i];
    a[i]=a[n-i];
    a[n-i]=temp;
  }
}
int main(){
  cin>>n;
  rep(i,n+1) cin>>a[i];
  reverse();
  solve();
  

  return 0;
}
