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;


const int MAX = 1e4 + 9;
int arr[MAX];
set <int> ans;

int gcd(int a, int b) {
	return (!b) ? a : gcd(b, a % b);
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	for (int i = n; i >= 0; i--) {
		cin >> arr[i];
	}
	if (arr[n] < 0) {
		for (int i = 0; i < n + 1; i++) {
			arr[i] = -arr[i];
		}
	}
	int g = arr[0];
	for (int i = 1; i < n + 1; i++) {
		g = gcd(g, abs(arr[i]));
	}
	for (int i = 1; i * i <= g; i++) {
		if (g % i == 0) {
			bool p1 = true, p2 = true;
			for (int j = 2; j * j <= i; j++) {
				if (i % j == 0) {
					p1 = false;
					break;
				}
			}
			for (int j = 2; j * j <= g / i; j++) {
				if ((g / i) % j == 0) {
					p2 = false;
					break;
				}
			}
			if (p1) {
				ans.insert(i);
			}
			if (p2) {
				ans.insert(g / i);
			}
		}
	}
	for (int i = 0; i < n + 1; i++) {
		arr[i] /= g;
	}
	for (int i = 2; i < n + 1; i++) {
		bool prime = true;
		for (int j = 2; j * j <= i; j++) {
			if (i % j == 0) {
				prime = false;
				break;
			}
		}
		if (!prime) {
			continue;
		}
		int tmp[MAX];
		for (int j = 0; j < n + 1; j++) {
			tmp[j] = arr[j];
		}
		for (int j = n; j >= i; j--) {
			tmp[j - i + 1] += tmp[j];
			tmp[j] = 0;
		}
		bool ok = true;
		for (int j = 0; j < n + 1; j++) {
			if (tmp[j] % i != 0) {
				ok = false;
				break;
			}
		}
		if (ok) {
			ans.insert(i);
		}
	}
	ans.erase(ans.find(1));
	for (auto a : ans) {
		cout << a << '\n';
	}
	return 0;
}