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;

using ll = long long;


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


vector<int> primes;


void build(int n = 1e5 + 7)
{
	vector<bool> er(n);

	for (int i = 2; i < n; i++)
		if (!er[i])
		{
			primes.push_back(i);
			for (ll j = i * (ll)i; j < n; j += i)
				er[j] = true;
		}
}


void solve(istream &cin = std::cin, ostream &cout = std::cout)
{
	build ();

	int n;

	cin >> n;

	vector<ll> arr(n + 1);

	for (auto &it : arr)
		cin >> it;

	reverse(arr.begin(), arr.end());

	ll g = 0;

	for (auto it : arr)
		g = gcd(g, abs(it));

	assert(g != 0);

	vector<int> ans;

	for (auto p : primes)
		if (g % p == 0)
		{
			ans.push_back(p);

			while (g % p == 0)
				g /= p;
		}

	if (g > 1)
		ans.push_back(g);

	for (auto p : primes)
	{
		if ((int)arr.size () + 10 < p)
			break;

		vector<ll> md(p);

		md[0] = arr[0];

		for (int i = 1; i < (int) arr.size(); i++)
			md[((i - 1) % (p - 1)) + 1] += arr[i];

		for (auto &it : md)
			it %= p;

		if (count(md.begin(), md.end(), 0) == p)
			ans.push_back(p);
	}

	sort(ans.begin(), ans.end());
	ans.resize(unique(ans.begin(), ans.end()) - ans.begin());

	for (auto it : ans)
		cout << it << endl;
}


int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);

	cout << fixed;

#ifdef LOCAL
	ifstream fin("../input.txt");

	solve(fin);

	cout << setprecision(4) << "clock: " << clock() / (double) CLOCKS_PER_SEC << endl;
#else
	cout << setprecision(20);

	solve();
#endif

	return 0;
}
