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<stdio.h>
#include<bits/stdc++.h>
#define f(a,b,c) for(register int a=(b);a<=(c);++a)
#define ff(a,b,c) for(register int a=(b);a>=(c);--a)
#define ll long long
//#define int long long
char pbuf[1<<20],*pp1=pbuf;
inline void push(char c){*pp1=c;pp1=(pp1-pbuf==(1<<20)-1)?(fwrite(pbuf,1,1<<20,stdout),pbuf):(pp1+1);}
#define pc push
//#define pc putchar
#define pe pc('\n')
#define ps pc(' ')
#define wer rd()
char *p1,*p2,buf[1<<20];
#define GC (p1==p2&&(p1=buf,p2=buf+fread(buf,1,1<<20,stdin),p1==p2)?0:(*(p1++)))
//#define GC getchar()
using namespace std;
inline ll wer{
	ll ans;char t,k;
	while(((t=GC)!='-')&&(t>'9'||t<'0'));
	k=(t=='-');
	ans=k?0:(t-'0');
	while((t=GC)>='0'&&t<='9')ans=ans*10+t-'0';
	return k?-ans:ans;
}
inline void wt(ll k)
{
	if(k<0)pc('-'),wt(-k);
	else
	{
		if(k<10)pc('0'+k);
		else wt(k/10),pc('0'+k%10);
	}
	return;
}

int n;ll t1,t2,t3;
ll a[100001],b[100001];
int isp[100001],pr[100001],pt;
void oula()
{
	f(i,2,10005)
	{
		if(isp[i]==0)pr[++pt]=i;
		for(int j=1;j<=pt&&i*pr[j]<=10005;j++)
		{
			isp[i*pr[j]]=1;
			if(i%pr[j]==0)break;
		}
	}
}
vector<int>v;
int main()
{
//	freopen("poly.in","r",stdin);
//	freopen("poly.out","w",stdout);
	n=wer;
	oula();
//	cerr<<"DEAFAKIOI\n";
//	cout<<"fuck\n";
    f(i,0,n)a[n-i]=wer;
    ll qwq;
    qwq=abs(a[n]); 
    for(int i=2;i*i<=qwq;i++)
    {
    	if(qwq%i==0)v.push_back(i);
    	while(qwq%i==0)qwq/=i;
	}
	if(qwq!=1&&qwq!=0)v.push_back(qwq);
	f(i,2,n+3)
	{
		if(!isp[i])v.push_back(i);
	}
	sort(v.begin(),v.end());
	v.resize(unique(v.begin(),v.end())-v.begin());
//	f(i,0,(int)v.size()-1)cout<<v[i]<<"    deafakioi\n";
	int qwqwq=0;
	f(deafakioi,0,(int)v.size()-1)
	{
		ll p=v[deafakioi];int f=0;
		f(i,0,n)b[i]=0;
		f(i,0,n)b[i%(p-1)]+=a[i];
		f(i,0,min((ll)n,p-2))if(b[i]%p!=0){f=1;break;}
		if(!f&&a[0]%p==0)cout<<p<<"\n",qwqwq=1;
	}
	if(!qwqwq)
	cout<<"\n";
    fwrite(pbuf,1,pp1-pbuf,stdout);
    return 0;
}

