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 inf 1010000000
#define infll 1010000000000000000ll
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pdd pair<double,double>
#define mpr make_pair
#define fi first
#define se second
#define pq priority_queue<int>
#define pqll priority_queue<ll>
#define up(x,y) (x<(y)?x=(y):0)
#define dn(x,y) (x>(y)?x=(y):0)
#define ad(x,y) (x=(x+(y))%mod)
using namespace std;

int n; ll a[10009],b[10009]; vi ans; map<int,int> mp;
int read(){
	int x=0; char ch=getchar(); bool flag=0;
	while (ch<'0' || ch>'9'){ if (ch=='-') flag=1; ch=getchar(); }
	while (ch>='0' && ch<='9'){ x=x*10+ch-'0'; ch=getchar(); }
	return flag?-x:x;
}
ll readll(){
	ll x=0; char ch=getchar(); bool flag=0;
	while (ch<'0' || ch>'9'){ if (ch=='-') flag=1; ch=getchar(); }
	while (ch>='0' && ch<='9'){ x=x*10+ch-'0'; ch=getchar(); }
	return flag?-x:x;
}
void check(int x){
	int i;
	//cerr<<x<<'\n';
	for (i=0; i<x && i<=n; i++){
		int j,tmp=0;
		for (j=n; j>=0; j--){
			tmp=((ll)tmp*i+a[j])%x;
	//		cerr<<tmp<<'\n';
		}
		if (tmp) return;
	}
	ans.pb(x); mp[x]=1;
}
int main(){
	scanf("%d",&n);
	int i;
	for (i=n; i>=0; i--) scanf("%lld",&a[i]);
	int m=abs(a[n]);
	for (i=2; i*i<=m; i++) if (!(m%i)){
		check(i);
		for (; !(m%i); m/=i);
	}
	if (m>1) check(m);
	//cerr<<n<<'\n';
	for (i=2; i<=n+1; i++){
	//	cerr<<n<<' '<<i<<'\n';
		int x; for (x=2; x*x<=i; x++) if (!(i%x)) break;
		if (x*x>i){
	//		cerr<<i<<'\n';
			int j;
			memcpy(b,a,sizeof(b));
			for (j=n; j>=i-1; j--) b[j-(i-1)]+=b[j]; 
			for (j=0; j<i-1; j++) if (b[j]%i) break;
		//	cerr<<j<<'\n';
			if (j==i-1 && !mp[i] && !(a[0]%i)) ans.pb(i);
		}
	}
	sort(ans.begin(),ans.end());
	for (int p:ans) printf("%d\n",p);
	return 0;
}
