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;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

int gcd(int A, int B) {
	if (B == 0) return A;
	return gcd(B, A % B);
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int N;
	//N = 8;
	//for (int i = 2; i <= 10; i++) {
	//	rep1(j, 8) {
	//		ll kari = 1;
	//		rep1(k, 8) {
	//			kari *= j;
	//			cesp(kari % i);
	//		}
	//		ce("");
	//	}
	//	ce("");
	//}

	cin >> N;
	int A[10001];
	rep(i, N + 1) cin >> A[N - i];

	set<int> kotae;
	int saidai = 10001;
	for (int i = 2; i <= saidai; i++) {
		int sosuu = 1;
		for (int j = 2; j < i; j++) {
			if (i % j == 0) {
				sosuu = 0;
				break;
			}
		}
		if (sosuu) {
			vector<int> V(i);
			rep1(j, N) {
				V[j % (i - 1)] += A[j];
			}
			int OK = 1;
			rep(j, i) {
				if (V[j] % i) OK = 0;
			}
			if (A[0] % i) OK = 0;
			if (OK) kotae.insert(i);
		}
	}

	int GCD = abs(A[N]);
	rep(i, N) if (A[i]) GCD = gcd(abs(A[i]), GCD);

	if (GCD > 1) {
		int saidai2 = sqrt(GCD) + 1;
		for (int i = 2; i <= saidai; i++) {
			if (GCD % i == 0) {
				while (GCD % i == 0) GCD /= i;
				kotae.insert(i);
			}
		}
		if (GCD > 1) kotae.insert(GCD);
	}

	for (int i : kotae) co(i);

	Would you please return 0;
}