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>
#define LL long long
#define DB long double
using namespace std;
//#define P 998244353
//inline int ad(int x,int y){return (x+y>=P)?(x+y-P):(x+y);}
//inline int mt(int x,int y){return 1ll*x*y%P;}
//inline void mo(int &x){x=(x>=P)?(x-P):x; x=(x<0)?(x+P):x;}
template<typename T>inline void ckmx(T &x,T y){x=max(x,y);}
template<typename T>inline void ckmi(T &x,T y){x=min(x,y);}
template<typename T>void read(T &x){
	x=0;int f=1;
	char c=getchar();
	for(;!isdigit(c);c=getchar()) if (c=='-') f=-1;
	for(;isdigit(c);c=getchar()) x=x*10+c-48;
	x*=f;
}
int gcd(int x,int y){
	if(y==0) return x;
	else return gcd(y,x%y);
}
int a[100010];
int ans[1000010],an,n;
int p[1000010],ss[100010],ssn;
int f[100010];
int tmp[100010];
int main(){
	for(int i=1;i<=1000000;++i) p[i]=i;
	for(int i=2;i<=1000000;++i){
		if(p[i]==i) ss[++ssn]=i;
		for(int j=1;j<=ssn;++j){
			if(i*ss[j]>1000000||p[i]<ss[j]) break;
			p[i*ss[j]]=ss[j];
		}
	}
	read(n);
	int gc=0;
	for(int i=0;i<=n;++i){
		read(a[n-i]);
		gc=gcd(gc,abs(a[n-i]));
	}
	int sv=gc;
	for(int i=2;i*i<=gc;++i)
	if(gc%i==0){
		f[i]=1; ans[++an]=i;
		while(gc%i==0) gc/=i;
	}
	if(gc!=1) {
		ans[++an]=gc;
		if(gc<=n) f[gc]=1;
	}
	gc=sv;
	for(int i=2;i<=n;++i)
	if(p[i]==i&&(!f[i])){
		for(int j=0;j<=n;++j) tmp[j]=a[j]%i;
		for(int j=n;j>=i;--j)
			tmp[j-i+1]=(tmp[j-i+1]+tmp[j])%i,tmp[j]=0;
		int f=1;
		for(int j=i;j>=0&&f;--j)
			f&=(tmp[j]==0);
		if(f) ans[++an]=i;
	}
	sort(ans+1,ans+1+an);
	for(int i=1;i<=an;++i)
		printf("%d\n",ans[i]);
	return 0;
}
