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;
#define ll long long

map<int,bool> mp;

int a[10010],b[10010];
int p[10010],h[10010],n,tt,tot,ans;
bool bo[10010];

inline int rd()
{
	int x=0,f=1;char ch=getchar();
	for (;ch<'0'||ch>'9';ch=getchar()) if (ch=='-') f=-1;
	for (;ch>='0'&&ch<='9';ch=getchar()) x=x*10+ch-'0';
	return x*f;
}

inline int gcd(int x,int y) { return (!y)?x:gcd(y,x%y); }

inline void pre_gao()
{
	tot=0;
	for (int i=2;i<=n;i++)
	{
		if (!bo[i]) p[++tot]=i;
		for (int j=1;j<=tot&&i*p[j]<=n;j++)
		{
			bo[i*p[j]]=true;
			if (i%p[j]==0) break;
		}
	}
}

inline void gao(int hh)
{
	for (int i=2;i*i<=hh;i++) if (hh%i==0)
	{
		ans++;mp[i]=true;
		while (hh%i==0) hh/=i;
	}
	if (hh>1) ans++,mp[hh]=true;
}

inline void check(int hh)
{
	bool flag=true;
	for (int i=0;i<=n;i++) b[i]=a[i]%hh;
	tt=0;
	for (int i=0;i<hh;i++) h[++tt]=i;
	random_shuffle(h+1,h+tt+1);
	for (int i=1;i<=tt;i++)
	{
		int now=1;
		ll res=0;
		for (int j=0;j<=n;j++)
		{
			if (j>0) now=now*h[i]%hh;
			res+=(ll)now*b[j];
		}
		res%=hh;
		if (res!=0) { flag=false;break; }
	}
	if (flag) mp[hh]=true,ans++;
}

int main()
{
	srand(19260816);
	n=rd();pre_gao();
	for (int i=n;i>=0;i--) a[i]=rd();
	int hh=0;ans=0;
	for (int i=0;i<=n;i++) hh=gcd(hh,abs(a[i]));
	gao(hh);
	for (int i=1;i<=tot;i++) if (!mp[p[i]]) check(p[i]);
	for (map<int,bool>::iterator it=mp.begin();it!=mp.end();it++) if (it->second==true) printf("%d\n",it->first);
	return 0;
}