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;

int gcd(int a, int b) {
	for (; b; swap(a, b))
		a %= b;
	return a;
}
int a[11111], q[11111];
int main() {
	int n;
	cin >> n;
	for (int i = n; i >= 0; i--)
		cin >> a[i];
	vector<int> o;
	int b = 0;
	for (int i = 0; i <= n; i++)
		b = gcd(b, abs(a[i]));
	for (int i = 2; i <= b / i; i++) {
		if (b%i) continue;
		o.push_back(i);
		while (b%i == 0) b /= i;
	}
	if (b > 1) o.push_back(b);
	for (int p = 2; p <= n; p++) {
		if (q[p]) continue;
		for (int j = p * p; j <= n; j += p)
			q[j] = 1;
		long f[11111] = {};
		if (a[0] % p) goto pn;
		for (int i = 0; i <= n; i++)
			(f[i % (p - 1)] += a[i] % p + p) %= p;
		for (int i = 0; i < p - 1; i++)
			if (f[i]) goto pn;
		o.push_back(p);
	pn:;
	}
	sort(o.begin(), o.end());
	unique(o.begin(), o.end());
	for (int m : o) cout << m << '\n';
	cout << flush;
	return 0;
}
