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 X first
#define Y second
#define pb emplace_back
#define FOR(i,a,b) for(int (i)=(a);i<(b);++(i))
#define EFOR(i,a,b) for(int (i)=(a);i<=(b);++(i))
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define rreps(X,S,Y) for (int (X) = (Y)-1;(X) >= (S);--(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef ll LL;
typedef pii PII;
typedef pll PLL;
template<class T> using vv=vector<vector<T>>;
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
const ll MOD=1e9+7;

int N;
LL A[114514];
bool is_composite[114514];
vector<LL> ps;

vector<LL> Facts(LL x) {
  vector<LL> ret;
  for (LL p : ps) {
    if (x%p == 0) ret.eb(p);
  }

  if (ret.empty() && x > 1) ret.eb(x);
  return ret;
}

int main() {
  reps(i, 2, 114514) {
    if (is_composite[i]) continue;
    for (int j=i+i; j<114514; j+=i) is_composite[j] = true;
    ps.eb(i);
  }

  scanf("%d", &N);
  rrep(i, N+1) {
    scanf("%lld", &A[i]);
  }

  vector<LL> ans;
  auto qs = Facts(llabs(A[N]));
  if (A[0] != 0) {
    ps = qs = Facts(A[0]);
  }

  for (LL q : qs) {
    bool ok = true;
    //assert(A[N]%q == 0);
    rep(i, N+1) {
      if (A[i]%q != 0) {
        ok = false;
        break;
      }
    }
    if (ok) ans.eb(q);
  }
  
  for (LL p : ps) {
    bool out = false;
    rep(s, p-1) {
      if (s > N) break;
      LL sm = 0;
      for (int i=s; i<=N; i+=p-1) {
        sm += A[i];
        sm %= p;
      }

      if (sm != 0) {
        out = true;
        break;
      }
    }
    if (!out) ans.eb(p);
  }
  sort(all(ans));
  ans.erase(unique(all(ans)), ans.end());
  for (auto p : ans) {
    printf("%lld\n", p);
  }
}
