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;

#define rep(i, N) for (int i = 0; i < (int)N; i++)
const ll MOD = pow(10,9)+7;
const ll LLINF = pow(2,61)-1;
const int INF = pow(2,30)-1;


const int pmax = pow(10,5);

vector<bool> isp(pmax, true);

void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i=2; pow(i,2)<=pmax; i++) {
    if (isp[i]) for(int j=2; i*j<=pmax; j++) isp[i*j] = false;
  }
}

ll gcd(ll a, ll b) { if (a<b) swap(a,b); return b==0 ? a : gcd(b, a%b); }
ll gcd_all(ll arr[], int N) {
  ll result = 0;
  rep(i,N) result = gcd(result, abs(arr[i]));
  return result;
}

int main() {
  int N; cin >> N;
  ll a[N+1]; rep(i,N+1) cin >> a[N-i];

  sieve();
  ll pos = 0; while(a[pos]==0) pos++;
  ll gcda = gcd_all(a,N+1);
  rep(p,N+1) {
    if (!isp[p]) continue;
    ll tmpa[N+1]; memcpy(tmpa, a, sizeof(a));
    for (int j=N; j-(p-1)>=0; j--) {
      tmpa[j-(p-1)] += tmpa[j];
      tmpa[j] = 0;
    }
    bool ok = true;
    rep(j,N+1) if (tmpa[j]%p!=0) ok = false;
    if (ok&&a[0]%p==0) cout << p << endl;
  }
  for (int p=1; p*p<=gcda; p++) {
    if (!isp[p]) continue;
    if (gcda%p==0) {
      if (p>=N+1) cout << p << endl;
      while(gcda%p==0) gcda /= p;
    }
  }
  if (gcda>=N+1&&gcda!=1) cout << gcda << endl;
  return 0;
}