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 <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<double> VD;
typedef vector<VD> VVD;

template<typename T> void chmin(T &a, T b) { if (a > b) a = b; }
template<typename T> void chmax(T &a, T b) { if (a < b) a = b; }

int in() { int x; scanf("%d", &x); return x; }
ll lin() { ll x; scanf("%lld", &x); return x; }

VL primes(int n){
    vector<bool> a(n+1, 1);
    VL p;
    FOR(x,2,n){
        if (!a[x]) continue;
        p.push_back(x);
        for (int y = 2 * x; y <= n; y += x) a[y] = 0;
    }
    return p;
}

ll gcd(ll x, ll y){
    if (y == 0) return x;
    return gcd(y, x % y);
}

int main() {
    int n;
    cin >> n;
    VI a(n + 1);
    REP(i,n + 1){
        a[n - i] = in();
    }

    VL ps = primes(n + 1);
    set<ll> ans;
    for (ll p : ps){
        VL cof(p);
        cof[0] = a[0];
        FOR(i,1,n){
            cof[(i - 1) % (p - 1) + 1] += a[i];
        }
        bool ok = true;
        REP(i,p) if (cof[i] % p != 0) ok = false;
        if (ok) ans.insert(p);
    }
    ll d = abs(a[n]);
    REP(i,n){
        if (a[i] != 0) d = gcd(d, abs(a[i]));
    }

    for (ll x = 2; x * x <= d; x++){
        if (d % x == 0){
            ans.insert(x);
            while (d % x == 0) d /= x;
        }
    }
    if (d > 1) ans.insert(d);

    for (ll x : ans) cout << x << endl;


    return 0;
}