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>
#define ll long long
using namespace std;
const int Q=1e5+5;
int p[Q],n;
ll op[1<<20];
int as[1<<20],maxn=0;
void Try(int MOD)
{
    if(p[0]%MOD)return;
    int lim=min(n,MOD-2);
    fill(op,op+lim+1,0);
    for(int i=0;i<=n;i++)
        op[i%(MOD-1)]+=p[i];
    for(int i=0;i<=lim;i++)
        if(op[i]%MOD)return;
    as[++maxn]=MOD;
}
int main()
{
    scanf("%d",&n);
    int had=0;
    for(int i=n;i>=0;--i)
        scanf("%d",&p[i]);
    int x=p[n];
    if(x<0)x=-x;
    for(int j=2;j*j<=x;j++)
        if(x%j==0){
            while(x%j==0)x/=j;
            Try(j);
        }
    if(x>1)Try(x);
    for(int i=2;i<=10000;i++){
        int gg=0;
        for(int j=2;j*j<=i;j++)
            if(i%j==0){
                gg=1;
                break;
            }
        if(!gg)Try(i);
    }
    sort(as+1,as+maxn+1);
    maxn=unique(as+1,as+maxn+1)-as-1;
    for(int i=1;i<=maxn;i++)
        printf("%d\n",as[i]);
    return 0;
}