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 <vector>
#include <iostream>
using namespace std;
int n, a[10001]; 

int gcd(int a, int b) {
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    if (a < b) swap(a, b);
    while (b > 0) {
        int t = a; a = b; b = t % b;
    }
    return a;
}

void check(int p) {
    if (a[0] % p) return;
    for (int i = 1; i <= min(n, p-1); i++) {
        long long sum = 0;
        for (int k = i; k <= n; k += p-1) sum += a[k];
        if (sum % p) { return; }
    }
    cout << p << endl;
}

int main() {
    cin >> n;
    for (int i = 0; i <= n; i++) cin >> a[n-i];

    vector<bool> b(10001, true);
    vector<int> primes;
    for (int p = 2; p < b.size(); p++) {
        if (b[p]) {
            check(p);
            primes.push_back(p);
            for (int q = p*p; q < b.size(); q += p) b[q] = false;
        }
    }
    int g = a[0];
    for (int i = 1; i <= n; i++) g = gcd(a[i], g);
    for (int p : primes) while (g % p == 0) g /= p;
    if (g > 1) cout << g << endl;
}
