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 n,a[10011],x,ans[200001],ansn,A[10011];
bool bo[100001];
 
int getval(int x,int nw)
{
	int ans=0;
	for (int i=n; i>=0; i--)
		ans=(1ll*ans*x+a[i])%nw;
	return ans;
}
 
int ran() {return rand()%1000*1000000+rand()%1000*1000+rand()%1000;}
 
void check(int nw)
{
	if (getval(0,nw)) return;
 	if (nw<=120)
	{
		for (int j=1; j<nw; j++)
			if (getval(j,nw)) return;
		ans[++ansn]=nw;
		return;
	}
	for (int j=1; j<=120; j++)
		if (getval(ran()%nw,nw)) return;
	ans[++ansn]=nw;
}
 
int main()
{
	memset(bo,1,sizeof(bo));
	for (int j=2; j<=100000; j++) if (bo[j])
		for (int i=(j<<1); i<=100000; i+=j) bo[i]=0;
	srand(20021221);
	scanf("%d",&n);
	for (int i=n; i>=0; i--) scanf("%d",&a[i]);
	for (int i=2; i<=40000; i++) if (bo[i]) check(i);
	int An=0;
	for (int i=0; i<=n; i++) if (a[i]) A[++An]=abs(a[i]);
	for (int T=1; T<=An&&T<=3; T++)
	{
		x=A[T];
		for (int i=2; i<=40000; i++) while (x%i==0) x/=i;
		if (x!=1) check(x);
	}
	sort(ans+1,ans+1+ansn);
	for (int i=1; i<=ansn; i++)
		if (ans[i]!=ans[i-1]) printf("%d\n",ans[i]);
	return 0;
}