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<cstdio>
#include<algorithm>
long long a[10005];
long long b[10005];
int vis[10005];
long long ans[10005];

void preWork(int n){
    vis[1] = 1;
    for(int i = 2; i <= n; i++){
        if(!vis[i]){
            for(int j = 2*i ; j <= n; j+=i) vis[j] = 1;
        }
    }
}

int isDivide(long long p,int n){
    for(int i = n; i >= 0; i--){ 
        b[i] = a[i]%p;
    }
    //for(int i = n; i >= 0; i--) if(b[i]!=0) printf("b[%d] = %lld\n",i,b[i]);
    for(int i = n; i >= 0; i--){
        if(b[i]!=0){
            if(i<p) return 0;
            else b[i-(p-1)] = (b[i-(p-1)]+b[i])%p;
        }
    }
    return 1;
}

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

int main(){
    preWork(10000);
    int n;
    scanf("%d",&n);
    for(int i = n; i >= 0; i--) scanf("%lld",&a[i]);
    long long g = a[n];
    for(int i = n-1; i >= 0; i--) g = gcd(g,a[i]);
    if(g<0) g *= -1;
    int size = 0;
    for(long long i = 2; i*i <= g; i++){
        if(g==1) break;
        if(g%i==0){
            ans[++size] = i;
            while(g%i==0) g /= i;
        }
    }
    if(g!=1) ans[++size] = g;
    for(int i = 2; i <= n; i++){
        if(vis[i]) continue;
        if(isDivide(i,n)) ans[++size] = i;
        //else printf("i = %d, failed\n",i);
    }
    std::sort(ans,ans+1+size);
    int p = 1;
    while(p<=size){
        int np = p;
        while(np+1<=size && ans[np+1]==ans[p]) np++;
        printf("%lld\n",ans[p]);
        p = np+1;
    }
    return 0;
}
