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 <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>

int gcd(int a, int b) {
  return b == 0 ? a : gcd(b, a % b);
}

bool divide(int p, std::vector<int> a) {
  for (int i = (int)a.size() - 1; i - p + 1 > 0; -- i) {
    a[i - p + 1] += a[i];
  }
  for (int i = std::min(p - 1, (int)a.size() - 1); i >= 0; -- i)
    if (a[i] % p)
      return false;
  return true;
}

bool is_prime(int p) {
  for (int i = 2; i * i <= p; ++ i)
    if (p % i == 0)
      return false;
  return true;
}

int main() {
  int n;
  scanf("%d", &n);
  std::vector<int> a(n + 1);
  int g = 0;
  for (int i = n; i >= 0; -- i) {
    scanf("%d", &a[i]);
    g = gcd(g, std::abs(a[i]));
  }
  std::vector<int> result;
  for (int p = 2; p <= n; ++ p) if (is_prime(p)) {
    if (divide(p, a))
      result.emplace_back(p);
  }
  for (int p = 2; p * p <= g; ++ p) if (g % p == 0) {
    while (g % p == 0) g /= p;
    if (divide(p, a))
      result.emplace_back(p);
  }
  if (g > 1 && divide(g, a))
    result.emplace_back(g);
  std::sort(result.begin(), result.end());
  result.erase(std::unique(result.begin(), result.end()), result.end());
  for (auto t : result)
    printf("%d\n", t);
}
