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 FOR(i,k,n) for(int i=(k);i<(int)(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(x) begin(x),end(x)

using namespace std;
using ll = int64_t;

// cond: a>b
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll gcd2(ll a,ll b){
  return a>b?gcd(a,b):gcd(b,a);
}

vector<ll> fact(ll x) {
  vector<ll> ans;
  for (ll i = 2; i*i <= x; ++i) {
    if ((x % i) == 0) {
      ans.push_back(i);
      while ((x % i) == 0) x /= i;
    }
  }
  if (x != 1) {
    ans.push_back(x);
  }
  return ans;
}

vector<ll> primes(ll n) {
  vector<ll> p(n+1, 1);
  for (ll i = 2; i*i <= n; ++i)
    if (p[i])
      for (ll j = i*i; j <= n; j += i)
        p[j] = 0;
  vector<ll> res;
  for (ll i = 2; i <= n; ++i)
    if (p[i])
      res.push_back(i);
  return res;
}

int main() {
  ll n;
  cin>>n;
  vector<ll> f(n+1);
  REP(i,n+1) cin>>f[n-i];
  ll g = abs(f[n]);
  REP(i,n) {
    g = gcd(g, abs(f[i]));
  }
  auto fct = fact(g);
  REP(i,n+1) {
    f[i] /= g;
  }
  auto p = primes(n);
  for(auto y : p) {
    auto fy = f;
    REP(i,n+1) {
      if (fy[i] < 0) {
        fy[i] = (y - (-fy[i])%y)%y;
      } else {
        fy[i] %= y;
      }
    }
    ll m = y-1;
    for (ll i = n; i >= y; --i) {
      fy[i-m] += fy[i];
      fy[i-m] %= y;
    }
    bool ok = true;
    REP(i,y) {
      if ((fy[i] % y) != 0) ok = false;
    }
    if (ok) fct.push_back(y);
  }
  sort(ALL(fct));
  fct.erase(unique(ALL(fct)), end(fct));
  for (auto y : fct) {
    cout << y << endl;
  }
  return 0;
}
