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<cstdlib>
#include<cmath>
#define N 100001
#define M 2001
using namespace std;
long long jc[N],njc[N],C[M][M];
long long a[N],sprime[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 ksmi(long long x,long long y,long long mod)
{
	long long total=1,ab=x,p=y;
	while (p)
	{
		if (p%2==1) total=total*ab%mod;
		ab=ab*ab%mod;
		p/=2;
	}
	return total;
}
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);
}
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;
	}
	for (int i=2;i<=n;i++)
	{
		bool bo=true;
		for (int j=2;j<i;j++)
		{
			if (i%j==0)
			{
				bo=false;break;
			}
		}	
		for (int j=1;j<=sprime[0];j++)
			if (sprime[j]==i)
			{
				bo=false;break;
			 } 
		if (!bo) continue;
		for (int j=1;j<=20;j++)
		{
			long long p=0;
			for (int k=n;k>=0;k--)
				p=(p*j%i+a[k])%i;
			if (p!=0)
			{
				bo=false;break;
			}
		}
		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]);
} 