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 maxn 10010
using namespace std;
template<typename T> inline void read(T &x)
{
    x=0;char c=getchar();bool flag=false;
    while(!isdigit(c)){if(c=='-')flag=true;c=getchar();}
    while(isdigit(c)){x=(x<<1)+(x<<3)+(c^48);c=getchar();}
    if(flag)x=-x;
}
int n,g,d_cnt;
int a[maxn],b[maxn],d[maxn];
int gcd(int a,int b)
{
    return b?gcd(b,a%b):a;
}
bool pri(int x)
{
    int lim=sqrt(x);
    for(int i=2;i<=lim;++i)
        if(x%i==0)
            return false;
    return true;
}
void work(int x)
{
    int lim=sqrt(x);
    for(int i=2;i<=lim;++i)
    {
        if(x%i) continue;
        d[++d_cnt]=i;
        while(x%i==0) x/=i;
    }
    if(x>1) d[++d_cnt]=x;
}
bool check(int p)
{
    if(a[0]%p) return false;
    memcpy(b,a,sizeof(a));
    for(int i=n;i>=p-1;--i)
        b[i-(p-1)]=(b[i-(p-1)]+b[i])%p,b[i]=0;
    for(int i=0;i<=n;++i)
        if(b[i]%p)
            return false;
    return true;
}
int main()
{
    read(n);
    for(int i=n;i>=0;--i)
        read(a[i]),g=gcd(g,abs(a[i]));
    work(g);
    for(int i=2;i<=n;++i)
        if(pri(i)&&check(i))
            d[++d_cnt]=i;
    sort(d+1,d+d_cnt+1);
    for(int i=1;i<=d_cnt;++i)
        if(d[i]!=d[i-1])
            printf("%d\n",d[i]);
    return 0;
}