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;
#define ll long long
char buf[1<<20],*p1,*p2;
#define GC (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<20,stdin),p1==p2)?0:*p1++)
template<class T> inline void read(T &n){
	char ch=GC;T w=1,x=0;
	while(!isdigit(ch)){if(ch=='-') w=-1;ch=GC;}
	while(isdigit(ch)){x=(x<<3)+(x<<1)+(ch^48);ch=GC;}
	n=x*w;
}
const int maxn=10005;
int n,A[maxn],B[maxn];
void check(int p){
	if(A[0]%p) return;
	for(int i=0;i<=n;i++) B[i]=A[i];
	for(int i=n;i>=p-1;i--){
		(B[i-(p-1)]+=B[i])%=p;
		B[i]=0;
	}
	for(int i=0;i<=n;i++) if(B[i]%p) return;
	printf("%d\n",p);
}
void solve(int x){
	for(int i=2;i*i<=x;i++){
		if(x%i) continue;
		if(i>n) printf("%d\n",i);
		while(x%i==0) x/=i;
	}
	if(x>max(n,1)) printf("%d\n",x);
}
int isp[maxn],pri[maxn],tot;
void seive(int N){
	for(int i=2;i<=N;i++){
		if(!isp[i]){
			pri[++tot]=i;
			check(i);
		}
		for(int j=1;j<=tot&&i*pri[j]<=N;j++){
			isp[i*pri[j]]=1;
			if(i%pri[j]==0) break;
		}
	}
}
inline int gcd(int x,int y){
	return y?gcd(y,x%y):x;
}
int main(){
//	freopen("poly.in","r",stdin);
//	freopen("poly.out","w",stdout);
	read(n);
	int G=0;
	for(int i=n;i>=0;i--)
		read(A[i]),G=gcd(abs(A[i]),G);
	seive(n),solve(G);
	return 0;
}