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;
using Int = long long;
bool test(const vector<Int> &A, int prime)
{
    vector<Int> B = A;
    for (int i = B.size()-1; i >= 0; i--) {
        if (i >= prime) B[i - prime + 1] += B[i];
        else if (B[i] % prime != 0) return false;
    }
    return true;
}
void factors(Int x, set<int>& S)
{
    if (x < 0) x *= -1;
    if (x == 0) return;
    for (Int i = 2; i*i <= x; i++) {
        if (x % i == 0) S.insert(i);
        while (x % i == 0) x /= i;
    }
    if (x != 1) S.insert(x);
}
vector<int> sieve(int x) // { p | p is prime, p <= x }
{
    vector<bool> B(max(2, x+1));
    B[0] = B[1] = true;
    for (int i = 2; i*i <= x; i++) {
        if (B[i]) continue;
        for (int j = i + i; j <= x; j += i) {
            B[j] = true;
        }
    }
    vector<int> ans;
    for (int i = 0; i <= x; i++) if (!B[i]) ans.push_back(i);
    return ans;
}
int main()
{
    int N; cin >> N;
    vector<Int> A(N+1); for (int i = N; i >= 0; i--) cin >> A[i];
    auto primes = sieve(N);
    set<int> S(begin(primes), end(primes));
    for (auto a : A) factors(a, S);
    for (auto p : S) if (test(A, p)) cout << p << '\n';
    return 0;
}
