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;

const int N = 10 * 1000 + 17;
const int MOD = 1000 * 1000 * 1000 + 7;

int n;
int a[N];

bool read() {
    if (!(cin >> n))
        return false;

    for (int i = n; i >= 0; --i)
        cin >> a[i];

    return true;
}

void solve() {
    set<int> ans;

    auto gcd = [](int a, int b) {
        for (; a != 0; b %= a, swap(a, b)) { }
        return b;
    };

    auto g = abs(a[n]);

    for (int i = 0; i < n; ++i)
        g = gcd(g, abs(a[i]));

    for (int i = 2; i * i <= g; ++i)
        for (; g % i == 0; g /= i)
            ans.insert(i);

    if (g != 1)
        ans.insert(g);

    auto prime = [](int p) {
        for (int i = 2; i * i <= p; ++i)
            if (p % i == 0)
                return false;

        return true;
    };

    for (int p = 2; p < N; ++p)
        if (prime(p) && a[0] % p == 0) {
            bool flag = true;

            for (int r = 0; r < p - 1 && flag; ++r) {
                auto cur = 0ll;

                for (int i = 0; r + i * (p - 1) <= n; ++i)
                    cur += a[r + i * (p - 1)];

                if (cur % p != 0)
                    flag = false;
            }

            if (flag)
                ans.insert(p);
        }

    for (const auto& i : ans)
        cout << i << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    while (read())
        solve();

    return 0;
}

