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 <cmath>
#include <vector>
#include <iostream>
using namespace std;
int gcd(int x, int y) {
	if (y == 0) return x;
	return gcd(y, x % y);
}
bool isprime(int x) {
	if (x <= 1) return false;
	for (int i = 2; i * i <= x; ++i) {
		if (x % i == 0) return false;
	}
	return true;
}
int main() {
	int N;
	cin >> N;
	vector<int> A(N + 1);
	for (int i = N; i >= 0; --i) cin >> A[i];
	int g = abs(A[N]);
	for (int i = 0; i < N; ++i) g = gcd(g, abs(A[i]));
	vector<int> ps;
	for (int i = 2; i * i <= g; ++i) {
		if (g % i == 0) {
			ps.push_back(i);
			while (g % i == 0) g /= i;
		}
	}
	if (g > 1) ps.push_back(g);
	vector<int> ans;
	for (int i = 2; i <= N; ++i) {
		if (!isprime(i)) continue;
		vector<long long> poly(i);
		for (int j = 0; j <= N; ++j) {
			if (j % (i - 1) != 0) poly[j % (i - 1)] += A[j];
			else poly[j == 0 ? 0 : i - 1] += A[j];
		}
		bool ok = true;
		for (int j = 0; j < i; ++j) {
			if (abs(poly[j]) % i != 0) {
				ok = false;
				break;
			}
		}
		if (ok) ans.push_back(i);
	}
	for (int i : ps) {
		if (i > N) ans.push_back(i);
	}
	for (int i : ans) {
		cout << i << '\n';
	}
	return 0;
}