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<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
const int N=20005;
int n,i,j,a[N],p[N],l,b[N],ans[N],g,cnt;
bool v[N];
int Abs(int a)
{
	return a>0?a:-a;
}
int gcd(int a,int b)
{
	if(!b)
		return a;
	return gcd(b,a%b);
}
int main()
{
	scanf("%d",&n);
	for(i=n;i>=0;--i)
		scanf("%d",a+i);
	for(i=2;i<=n;++i)
	{
		if(!v[i])
			p[++l]=i;
		for(j=1;j<=l&&p[j]*i<=n;++j)
		{
			v[p[j]*i]=true;
			if(i%p[j]==0)
				break;
		}
	}
	g=Abs(a[0]);
	for(i=1;i<=n;++i)
		g=gcd(g,Abs(a[i]));
	for(i=2;i*i<=g;++i)
		if(g%i==0)
		{
			ans[++cnt]=i;
			while(g%i==0)
				g/=i;
		}
	if(g>1)
		ans[++cnt]=g;
	for(i=1;i<=l;++i)
	{
		for(j=0;j<=n;++j)
			b[j]=(a[j]%p[i]+p[i])%p[i];
		for(j=n;j-p[i]+1>=1;--j)
		{
			b[j-p[i]+1]=(b[j-p[i]+1]+b[j])%p[i];
			b[j]=0;
		}
		for(;j>=0;--j)
			if(b[j]!=0)
				break;
		if(j<0&&g%p[i]!=0)
			ans[++cnt]=p[i];
	}
	sort(ans+1,ans+1+cnt);
	for(i=1;i<=cnt;++i)
		printf("%d\n",ans[i]);
	return 0;
}
