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 <algorithm>
using namespace std;

long long gcd(long long a, long long b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}

long long N, A[100009], E;

int main() {
	cin >> N; for (int i = N; i >= 0; i--) { cin >> A[i]; E = gcd(E, abs(A[i])); }
	
	vector<long long>P, Q;
	for (long long i = 2; i*i <= E; i++) {
		if (E%i == 0) {
			P.push_back(i);
			while (E%i == 0) E /= i;
		}
	}
	if (E >= 2) P.push_back(E);

	for (int i = 2; i <= 10000; i++) {
		bool flag = false;
		for (int j = 2; j*j <= i; j++) {
			if (i%j == 0) flag = true;
		}
		if (flag == false) P.push_back(i);
	}
	sort(P.begin(), P.end());
	P.erase(unique(P.begin(), P.end()), P.end());

	for (long long i : P) {
		long long mod = i;
		bool flag = false;

		for (long long t = -12; t <= 12; t++) {
			long long C = 0, D = 1;
			for (int j = 0; j <= N; j++) {
				C += D * A[j]; D *= t; D += mod * mod; D %= mod;
				C %= mod;
			}
			if (C != 0) { flag = true; break; }
		}

		if (flag == false) Q.push_back(i);
	}

	for (int i = 0; i < Q.size(); i++) cout << Q[i] << endl;
	return 0;
}