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;
const int N=1e4+5;
int n,sum;
int main()
{
	scanf("%d",&n);
	vector<int> f(n+1),zs;
	vector<long long> a(n+1);
	for(int i=n;i>=0;i--)
		scanf("%lld",&a[i]);
	for(int i=2;i<=n;i++)
		if(!f[i])
		{
			zs.push_back(i);
			for(int j=i+i;j<=n;j+=i)
				f[j]=1;
		}
	sum=abs(a[n]);
	for(int i=2;i*i<=sum;i++)
		if(sum%i==0)
		{
			if(i>n)zs.push_back(i);
			while(sum%i==0)sum/=i;
		}
	if(sum>max(1,n))zs.push_back(sum);
	for(int x:zs)
	{
		vector<long long> b=a;
		for(int j=n;j>=x;j--)b[j-(x-1)]+=b[j];
		int fl=1;
		for(int j=0;j<=min(n,x-1) && fl;j++)
			fl&=b[j]%x==0;
		if(fl)printf("%d\n",x);
	}
} 