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;
 
const int MAXN = 1e6 + 10;
 
LL gcd(LL p, LL q) {
    return q ? gcd(q, p % q) : p;
}
vector<int> pm;
int vis[55555];
LL a[55555];
vector<int> f;
int N;
 
const int m = 22;
LL magic[m] = {148491793ll,148492177ll,148492609ll,148493027ll,
148491799ll,148492181ll,148492613ll,148493041ll,1000000007ll,122420729ll,163227661ll,
217636919ll,290182597ll,386910137ll,515880193ll,687840301ll,12357ll,-1ll,-2ll,-3ll,-5ll,-7ll};
 
bool check(LL x) {
    for (int o = 0; o < m; o++) {
        LL ret = a[N] % x;
        LL P = magic[o];
        for (int i = N - 1; i >= 0; i--) {
            ret = (ret * P + a[i]) % x;
        }
        if (ret != 0) return false;
    }
    return true;
}
 
int main(){
    srand(time(NULL));
    N = 33333;
    for (int i = 2; i < N; ) {
        pm.push_back(i);
        for (int j = i; j < N; j += i)
            vis[j] = 1;
        while (i < N && vis[i]) i++;
    }
    // int cnt = 0;
    // for (auto &x:pm) if (x<=10000) cnt++;
    // for (auto &x:pm) if (x<=10) cout << x << ' ';
    // cout << cnt << endl;
    scanf("%d", &N);
    for (int i = N; i >= 0; i--)
        scanf("%lld", &a[i]);
    LL ret = abs(a[N]);
    for (int i = 0; i < N; i++)
        ret = gcd(ret, abs(a[i]));
    for (auto &x : pm) 
        if (ret % x == 0) {
            f.push_back(x);
            vis[x] = 2;
            while (ret % x == 0) ret /= x;
        }
    if (ret != 1) f.push_back(ret);
    for (auto &x : pm) 
        if (x <= N && vis[x] != 2) {
            if (check(x))
                f.push_back(x);
        }
    sort(f.begin(), f.end());
    f.resize(unique(f.begin(), f.end()) - f.begin());
    for (auto &x : f)
        printf("%d\n", x);
    return 0;
}