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;
typedef long double ld;
#define int long long
int n, p;
const int maxN = (int)1e4 + 100;
ll a[maxN];
ll gcd(ll a, ll b) {
    a = abs(a);
    b = abs(b);
    while (a > 0 && b > 0) {
        if (a < b) swap(a, b);
        a %= b;
    }
    return (a + b);
}
bool used[maxN];
bool pr(ll x) {
    if (x == 1) return false;
    for (int i = 2; 1LL * i * i <= x; i++) {
        if (x % i == 0) return false;
    }
    return true;
}
bool solve(int p) {
    vector < ll > res(p, 0);
    for (int i = 0; i <= n; i++) {
        res[i % (p - 1)] += a[i];
    }
    if (a[0] % p != 0) return false;
    for (int i = 0; i < p; i++) {
        if (res[i] % p != 0) return false;
    }
    return true;
}
signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    cin >> n;
    ll d = 0;
    for (int i = n; i >= 0; i--) {
        cin >> a[i];
        d = gcd(d, a[i]);
    }
    set < ll > cur;
    for (int i = 2; i < maxN; i++) {
        if (!used[i]) {
            used[i] = true;
            for (int j = 2 * i; j < maxN; j += i) used[j] = true;
            if (solve(i)) cur.insert(i);
        }
    }
    for (ll j = 1; 1LL * j * j <= d; j++) {
        if (d % j == 0) {
            if (pr(j)) cur.insert(j);
            if (pr(d / j)) cur.insert(d / j);
        }
    }
    for (auto it : cur) cout << it << '\n';
    return 0;
}