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
#pragma GCC optimize(2)
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#define N 200001
#define M 2001
using namespace std;
long long jc[N],njc[N],C[M][M];
int n;
bool bzs[N];
long long a[N],sprime[N],yu[N];
int prime[]={0,2,3,5,7,13,17,19,29,31,41,89,97};
long long xabs(long long x)
{
	if (x<0)return -x;
	return x;
}
long long gcd(long long x,long long y)
{
	if (y==0) return x;
	return gcd(y,x%y);
}
void qsort(int l,int r)
{
	int i=l,j=r;
	long long mid=sprime[(i+j)/2];
	while (i<=j)
	{
		while (sprime[i]<mid) i++;
		while (sprime[j]>mid) j--;
		if (i<=j)
		{
			long long t=sprime[i];sprime[i]=sprime[j];sprime[j]=t;
			i++;j--;
		}
	}
	if (i<r) qsort(i,r);
	if (l<j) qsort(l,j);
}
bool div(long long *a,int s)
{
	if (a[0]%s!=0) return false;
	bool bo=true;
	memset(yu,0,sizeof(yu));
	for (int i=n;i>=0;i--) yu[i]=a[i]; 
	if (s==2)
	{
		long long sp=0;
		for (int i=n;i>=0;i--)
			sp=(sp%s+a[i])%s;
		if (sp!=0) return false;
		return true;
	}
	for (int i=n;i>=0;i--)
	{
		if (i-s+1<0) break;
		yu[i-s+1]=(yu[i-s+1]+yu[i])%s;
		yu[i]=0;
	}
	for (int i=n;i>=0;i--)
	{
		if (yu[i]%s!=0)
		{
			bo=false;break;
		}
	}
	return bo;
}
int main()
{
//	long long n;
	scanf("%lld",&n);
	for (int i=n;i>=0;i--) scanf("%lld",&a[i]);
	long long s=0;
	for (int i=0;i<=n;i++) 
	{
		if (s==0&&a[i]!=0) s=xabs(a[i]);
		else	
			if (a[i]!=0) s=gcd(s,xabs(a[i]));
	}
	sprime[0]=0;
	for (int i=2;i<=sqrt(s);i++)
	{
		if (s==1) break;
		if (s%i==0)
		{
			sprime[0]++;sprime[sprime[0]]=i;
			while (s%i==0) s/=i;
		}
	}
	if (s!=1) 
	{
		sprime[0]++;sprime[sprime[0]]=s;
	}
	memset(bzs,false,sizeof(bzs));
	for (int i=1;i<=sprime[0];i++)
		if (sprime[i]<=n) bzs[sprime[i]]=true; 
	for (int i=2;i<=n;i++)
	{
		bool bo=true;
		for (int j=2;j<=sqrt(i);j++)
		{
			if (i%j==0)
			{
				bo=false;break;
			}
		}	
		if (bzs[i]||!bo) continue;
		bo=div(a,i);
		if (!bo) continue;
		sprime[0]++;sprime[sprime[0]]=i;
	}
	qsort(1,sprime[0]);
	for (int i=1;i<=sprime[0];i++)
		if (i==1||sprime[i]!=sprime[i-1]) 
			printf("%d\n",sprime[i]);
} 