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<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<math.h>
using namespace std;
#define vel vector<long long>
#define vvel vector<vel>
#define int long long
#define ll long long
#define D double
#define veb vector<bool>
#define vveb vector<veb>
#define V vector
#define pin pair<int,int>
#define sor(a) sort(a.begin(),a.end())
#define mp make_pair 
#define rep(i,n) for(int i=0;i<n;i++)
#define mmin(x,y) x=min(x,y)
#define mmax(x,y) x=max(x,y)
#define upperbound(v,val) upper_bound(v.begin(),v.end(),val)
#define lowerbound(v,val) lower_bound(v.begin(),v.end(),val)
int gcd(int a,int b){
	a = abs(a); b = abs(b);
	if (a < b) { swap(a, b); }
	if (b == 0) { return a; }
	else { return gcd(b, a%b); }
}
bool ret(int p, vel &a) {
	vel ans(p,0);
	if (a[0]%p != 0) { return false; }
	for(int i=1;i<a.size();i++) {
		int pl = i % (p - 1);
		if (pl == 0) { pl += p-1; }
		ans[pl] += a[i];
	}
	bool xx = true;
	rep(i, p) { xx = xx & (ans[i]%p == 0); }
	return xx;
}
bool is_prime(int x) {
	for (int i = 2; i*i <= x; i++) {
		if (x%i == 0 and x != i) { return false; }
	}
	return true;
}
int ord(int n, int p) {
	if (n%p != 0) { return 0; }
	return ord(n / p,p) + 1;
}
int rui(int n, int ru) {
	if (ru == 0) { return 1; }
	return rui(n, ru - 1)*n;
}
signed main() {
	int n; cin >> n;
	vel a(n+1);
	rep(i, n+1) { cin >> a[n - i]; }
	int gd = abs(a[n]);
	rep(i, n) { gd = gcd(gd, a[i + 1]); }
	vel all_list(0);
	veb can_div(n + 1, false);
	for (int i = 2; i <= n; i++) {
		if (is_prime(i)) {
			can_div[i] = ret(i, a);
			if (can_div[i]) {
				all_list.push_back(i);
			}
		}
	}
	int qgd = gd;
	for (int i = 2; i*i <= qgd; i++) {
		int ord1 = ord(gd, i);
		if (ord1 > 0) { 
			gd = gd / rui(i,ord1); 
			if (i > n) { all_list.push_back(i); }
		}
	}
	if (gd>n and gd>1) { all_list.push_back(gd); }
	sor(all_list);
	rep(i, all_list.size()) { cout << all_list[i] << endl; }
	return 0;
}