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>
using namespace std;
int a[100005],n,i,g,p[100005],k,j,ans[100005],tot;
int f[100005];
int gcd(int x,int y)
{
	return (y?gcd(y,x%y):x);
}
bool judge(int x)
{
	int i;
	for(i=0;i<=n&&i<x-1;++i)
	{
		long long s=0;
		for(j=i;j<=n;j+=x-1)
			s+=a[j];
		if(s%x!=0)
			return false;
	}
	return true;
}
int main()
{
	scanf("%d",&n);
	for(i=n;i>=0;--i)
		scanf("%d",&a[i]);
	for(i=1;i<=n;++i)
		g=gcd(abs(a[i]),g);
	for(j=2;j*j<=g;++j)
		if(g%j==0)
		{
			ans[++tot]=j;
			while(g%j==0)
				g/=j;
		}
	if(g!=1)
		ans[++tot]=g;
	if(a[0])
	{
		int j,s=abs(a[0]);
		for(j=2;j*j<=s;++j)
			if(s%j==0)
			{
				p[++k]=j;
				while(s%j==0)
					s/=j;
			}
		if(s!=1)
			p[++k]=s;
		for(i=1;i<=k;++i)
			if(judge(p[i]))
				ans[++tot]=p[i];
	}
	else
	{
		for(i=2;i<=10100;++i)
			if(f[i]==0)
				for(j=i*2;j<=10100;j+=i)
					f[j]=1;
		for(i=2;i<=10100;++i)
			if(f[i]==0)
				if(judge(i))
					ans[++tot]=i;
	}
	sort(ans+1,ans+1+tot);
	for(i=1;i<=tot;++i)
		if(ans[i]!=ans[i-1])
			printf("%d\n",ans[i]);
}
