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;
typedef long long ll;
const int N=200025,inf=0x3f3f3f3f;
int read(){
	int f=1,g=0;
	char ch=getchar();
	for (;!isdigit(ch);ch=getchar()) if (ch=='-') f=-1;
	for (;isdigit(ch);ch=getchar()) g=g*10+ch-'0';
	return f*g;
}
int gcd(int x,int y){
	if (!y) return x;
	int r=x%y;
	while (r){
		x=y;y=r;r=x%y;
	}
	return y;
}
int n,a[N],pr[N],m,h[N];
set<int> ans;
void check(int p){
	for (int i=0;i<p-1;i++) h[i]=0;
	for (int i=0;i<=n;i++){
		int x=i%(p-1);
		h[x]=(h[x]+a[i])%p;
	}
	for (int i=0;i<p-1;i++) if (h[i]) return;
	ans.insert(p);
}
int main(){
//	freopen("num.in","r",stdin);
//	freopen("num.out","w",stdout);
	n=read();m=0;
	for (int i=n;i>=0;i--){
		a[i]=read();
		m=gcd(m,abs(a[i]));
	}
	for (int i=2;i*i<=m;i++)
	if (m%i==0){
		ans.insert(i);
		while(m%i==0) m/=i;
	}
	if (m!=1) ans.insert(m);
	for (int i=2;i<=n;i++)
	if (!pr[i]){
		if (a[0]%i==0) check(i);
		for (int j=i+i;j<=n;j+=i) pr[j]=1;
	}
	for (auto x : ans) printf("%d\n",x);
	return 0;
}
