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 LL N = 10010;
LL a[N], b[N], c[N];
bool v[N];

inline LL gcd(LL a, LL b)
{
    return (b ? gcd(b, a % b) : a);
}

int main()
{
    register LL n, p = 0, num = 0;
    scanf("%lld", &n);
    for (register LL i = n; i >= 0; --i) {
        scanf("%lld", &a[i]);
        p = gcd(p, abs(a[i])), b[i] = a[i];
    }
    for (register LL i = 2, q; i <= n; ++i) {
        if (v[i] == 1) continue;
        if (b[0] % i != 0) goto nxt;
        for (register LL j = 0; j <= n; ++j)
            a[j] = b[j];
        for (register LL j = n; j >= i - 1; --j)
            a[j - (i - 1)] = (a[j] + a[j - (i - 1)]) % i, a[j] = 0;
        for (register LL j = 0; j <= n; ++j) {
            if (a[j] % i != 0) goto nxt;
        }
        c[++num] = i;
        nxt:;
        q = n / i;
        for (register LL j = i; j <= q; ++j)
            v[i * j] = 1;
    }
    for (register LL i = 2; i <= (LL)sqrt(p); ++i) {
        if (p % i == 0) {
            c[++num] = i;
            while (p % i == 0) p = p / i;
        }
    }
    if (p > 1) c[++num] = p;
    sort(c + 1, c + num + 1);
    for (register int i = 1; i <= num; ++i) {
        if (c[i] == c[i - 1]) continue;
        printf("%d\n", c[i]);
    }
    return 0;
}
