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;
int gcd (int a, int b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  if (a < b) swap(a, b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct sieve_of_eratosthenes {
  vector<bool> is_prime;
  vector<int> prime_numbers;
  sieve_of_eratosthenes(int n)
    : is_prime(vector<bool>(n, true))
    , prime_numbers(vector<int>(0))
  {
    is_prime[1] = false;
    for (int i = 2; i < n; i++) if (is_prime[i]) {
      prime_numbers.push_back(i);
      for (int j = 2 * i; j < n; j += i) {
        if (is_prime[i]) is_prime[j] = false;
      }
    }
  }
};
int main() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = n; i >= 0; i--) cin >> a[i];
  sieve_of_eratosthenes sieve(n + 1);
  set<int> ret;
  for (auto const&p : sieve.prime_numbers) {
    if (a[0] % p) continue;
    bool flg = false;
    for (int i = 0; i < p - 1; i++) {
      int tmp = 0;
      for (int j = i; j <= n; j += p - 1) {
        tmp += a[j];
      }
      if (tmp % p) {
        flg = true;
        break;
      }
    }
    if (!flg) ret.insert(p);
  }
  int g = a[0];
  for (int i = 1; i <= n; i++) g = gcd(g, a[i]);
  for (int p = 2; p * p <= g; p++) {
    while (!(g % p)) {
      g /= p;
      ret.insert(p);
    }
  }
  if (g != 1) ret.insert(g);
  for (auto it = ret.begin(); it != ret.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
