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 <iostream>
#include <cstdio>
#include <cmath>
#include <set>
using namespace std;

typedef long long ll;
const int N = 1e4 + 5;

int n;
int a[N];
ll b[N];
bool pr[N];

bool check(int p)
{
    for (int k = 0; k < N; ++k)
        b[k] = 0;

    for (int i = 0; i <= n; ++i)
        b[i % (p - 1)] += (a[i] % p + p) % p;

    for (int i = 0; i < N; ++i)
        if (b[i] % p) return false;

    return true;
}

int gcd(int a, int b)
{
    if (b == 0) return a;
    return gcd(b, a % b);
}

int main()
{
    scanf("%d", &n);

    int g = 0;
    for (int i = n; i >= 0; --i)
    {
        scanf("%d", a + i);
        g = gcd(g, abs(a[i]));
    }


    set<int> out;

    for (int x = 2; x * x <= g; ++x)
    {
        if (g % x) continue;
        while(g % x == 0) g /= x;
        out.insert(x);
    }
    if (g > 1) out.insert(g);

    for (int x = 2; x < N; ++x)
        pr[x] = true;
    for (int x = 2; x < N; ++x)
    {
        if (!pr[x]) continue;
        if (a[0] % x == 0 && check(x))
            out.insert(x);
        for (int y = x + x; y < N; y += x)
            pr[y] = false;
    }

    for (int p : out)
        printf("%d\n", p);
}
