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;
inline int Abs(int x){return x<0?-x:x;}
inline int gcd(int a,int b)
{
	while(a&&b) if(a>b) a%=b;else b%=a;
	return a?a:b;
}
int a[10010],n,v=0,isprime[10010],val[10010];
set<int> ans;
inline int check(int x)
{
	for(int i=0;i<x-1;i++) val[i]=0;
	for(int i=0;i<=n;i++) val[i%(x-1)]=(val[i%(x-1)]+a[i]%x+x)%x;
	for(int i=0;i<x-1;i++) if(val[i]) return 0;
	return 1;
}
int main()
{
	scanf("%d",&n);
	for(int i=n;i>=0;i--) scanf("%d",a+i),v=gcd(v,Abs(a[i]));
	for(int i=2;i*i<=v;i++) if(v%i==0)
		{while(v%i==0) v/=i;ans.insert(i);}
	if(v>1) ans.insert(v);
	for(int i=2;i<=n;i++) isprime[i]=1;
	for(int i=2;i<=n;i++) if(isprime[i]) for(int j=i+i;j<=n;j+=i) isprime[j]=0;
	for(int i=2;i<=n;i++) if(isprime[i]&&a[0]%i==0&&check(i)) ans.insert(i);
	for(set<int>::iterator it=ans.begin();it!=ans.end();it++) printf("%d\n",*it);
}