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;
#define REP(i,N) for(i=0;i<N;i++)
#define INF 1e9
typedef long long ll;
typedef pair<ll,ll> P;

//素因数分解(O(rootn))
vector<P> prime_factor(ll n){
  vector<P> v;
  for(int i = 2; i<=sqrt(n);i++){
    ll num=0;
    while(n%i==0){ ++num; n/=i; }
    if(num!=0)v.push_back(P(i,num));

  }
  if(n!=1) v.push_back(P(n,1));
  return v;
}

ll gcd(ll a,ll b){
  if(a<0)a=-a;
  if(b<0)b=-b;
  if(b==0)return a;
  else return gcd(b,a%b);
}

//nまでの素数
vector<ll> eratosthenes(ll n){
  int i;
  vector<bool> isprime(n,true);
  vector<ll> res;
  isprime[0]=false;isprime[1]=false;
  REP(i,n){
    if(isprime[i]){
      res.push_back(i);
      for(int j = i*2;j<n;j+=i) isprime[j] = false;
    }
  }
  return res;
}

int main(void){
  int i,N;
  cin >> N;
  N++;
  vector<ll> a(N);
  REP(i,N) cin >> a[i];
  reverse(a.begin(),a.end());

  set<ll> res;

  //f(x) = 0の場合
  ll g = 0;
  //最大公約数
  REP(i,N) g = gcd(g,a[i]);
  //素因数分解して，resに入れていく
  vector<P> m = prime_factor(g);
  REP(i,m.size()) res.insert(m[i].first);

  //N以下の素数pをすべて試す
  vector<ll> era = eratosthenes(N);
  REP(i,era.size()){
    ll p = era[i];
    vector<ll> b(p,0);
    int d;REP(d,p) b[d] = a[d]%p;
    for(d=p;d<N;d++){
      int r = d%(p-1);
      if(r==0)r=p-1;
      b[r] = (b[r] + a[d]%p)%p;
    }

    bool check = true;
    REP(d,p)if(b[d]!=0){check=false;break;}
    if(check)res.insert(p);
  }
  for(auto p : res) cout << p << endl;
  return 0;
}
