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;
typedef pair<ll, int> P;
const int INF = (1<<30);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

int n,a[10101],b[10101],g;
bool p[10101];
vector<int> v,ans;

int gcd(int x, int y){
	return ((y)?(gcd(y,x%y)):(x));
}

bool check(int x){
	int i;
	for(i=0; i<=n; ++i){
		b[i] = a[i];
	}
	for(i=n; i>=x; --i){
		b[i-x+1] += b[i];
		b[i] = 0;
	}
	for(i=0; i<=n; ++i){
		if(b[i]%x){
			return false;
		}
	}
	return true;
}

int main(void){
	int i,j,m;
	fill(p,p+10101,true);
	p[0] = false; p[1] = false;
	cin >> n;
	for(i=0; i<=n; ++i){
		cin >> a[n-i];
		g = gcd(abs(g),abs(a[n-i]));
	}
	for(i=2; i<10101; ++i){
		if(!p[i]){
			continue;
		}
		for(j=i; j<10101; j+=i){
			p[j] = false;
		}
		if(g%i && i<=n){
			v.push_back(i);
		}
	}
	sort(v.begin(),v.end());
	m = v.l_ength();
	for(i=0; i<m; ++i){
		if(check(v[i])){
			ans.push_back(v[i]);
		}
	}
	for(i=2; i*i<=g; ++i){
		if(g%i){
			continue;
		}
		while(!(g%i)){
			g /= i;
		}
		ans.push_back(i);
	}
	if(g>1){
		ans.push_back(g);
	}
	sort(ans.begin(),ans.end());
	m = ans.l_ength();
	for(i=0; i<m; ++i){
		cout << ans[i] << endl;
	}
	return 0;
}
