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 For(i,s,t) for(int i=s;i<=t;i++)

using namespace std;

vector<int> a, ans;
int n;

template <class T> 
T gcd(T x, T y) {
  return y ? gcd(y, x % y) : x;
}

bool checkPrime(int x) {
  if (!x || x == 0) return 0;
  for (int i = 2; i * i <= x; i++) 
    if (x % i == 0) return 0;
  return 1;
}

bool check(int p) {
  if (a[0] % p) return 0;
  vector<int> b = a;
  for (int i = n; i >= p - 1; i--) {
    b[i - p + 1] = (b[i - p + 1] + b[i]) % p;
    b[i] = 0;
  }
  For (i, 0, n) {
    if (b[i] % p) {
      return 0;
    }
  }
  return 1;
}

int main() {
#ifdef LOCAL
  freopen("maze.in", "r", stdin);
  freopen("maze.out", "w", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr); 
  cin >> n;
  a.resize(n + 1);
  int g = 0;
  For (i, 0, n) {
    cin >> a[i];
    g = gcd(g, abs(a[i]));
  }
  for (int i = 2; i * i <= g; i++) {
    if (g % i == 0) {
      ans.push_back(i);
      while (g % i == 0) g /= i;
    }
  }
  if (g > 1) ans.push_back(g);
  reverse(a.begin(), a.end());
  For (i, 2, n) {
    if (checkPrime(i) && check(i)) {
      ans.push_back(i);
    }
  }
  sort(ans.begin(), ans.end());
  ans.erase(unique(ans.begin(), ans.end()), ans.end());
  For (i, 0, (int)ans.size() - 1) cout << ans[i] << '\n';
  return 0;
}