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 <vector>
#include <string>
#include <set>
#include <map>
#define REP(i, n) for (int i = 0; i < (n); i++)

using namespace std;

long long gcd(long long x, long long y) {
  while (y != 0) {
    long long r = x % y;
    x = y;
    y = r;
  }
  return x;
}

map<long long, int> factor(long long n) {
  map<long long, int> mp;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      mp[i]++;
      n /= i;
    }
  }
  if (n > 1) mp[n] = 1;
  return mp;
}

int main() {
  int N;
  cin >> N;
  vector<long long> A(N+1);
  REP(i, N+1) cin >> A[i];
  reverse(A.begin(), A.end());
  vector<bool> p(N+21, true);
  for (int i = 2; i <= N+20; i++) {
    if (p[i]) {
      for (int j = i * 2; j <= N+20; j += i) {
        p[j] = false;
      }
    }
  }
  set<long long> ans;
  for (int i = 2; i <= N+20; i++) if (p[i]) {
    bool all = true;
    vector<long long> B(i - 1);
    for (int j = 0; j <= N; j++) {
      B[j % (i - 1)] += A[j];
    }
    if (A[0] % i != 0) all = false;
    for (long long j = 1; j < i && all; j++) {
      long long x = 0;
      for (int k = i - 2; k >= 0; k--) x = (x * j + B[k]) % i;
      all &= x == 0;
    }
    if (all) ans.insert(i);
  }
  long long g = 0;
  REP(i,N+1) g = gcd(g, abs(A[i]));
  for (auto e : factor(g)) {
    ans.insert(e.first);
  }
  for (long long e : ans) cout << e << '\n';
}
