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],b[10011];
int gcd(int x,int y){return !y?x:gcd(y,x%y);}
bool prime(int x)
{
	for(int i=2;i*i<=x;i++)
		if(x%i==0)return 0;
	return x!=1;
}
int main()
{
	cin>>n;
	int g=0;
	for(int i=n;i>=0;i--)cin>>a[i],g=gcd(g,abs(a[i]));
	set<int> s;
	for(int i=2;i*i<=g;i++)
		if(g%i==0)
		{
			s.insert(i);
			while(g%i==0)g/=i;
		}
	if(g>1)s.insert(g);
	for(int i=2;i<=n;i++)
		if(prime(i)&&a[0]%i==0)
		{
			for(int j=0;j<=n;j++)b[j]=(a[j]%i+i)%i;
			for(int j=n,k=n-i+1;k;j--,k--)b[k]=(b[j]+b[k])%i,b[j]=0;
			bool f=1;
			for(int j=n;j>=0;j--)
				if(b[j]%i){f=0;break;}
			if(f)s.insert(i);
		}
	for(int i:s)cout<<i<<'\n';
}
