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<set>
#include<algorithm>
#include<cmath>
#include<vector>

using namespace std;
typedef long long ll;
int N;
ll a[10001];

set<ll> ans;

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

void bunkai(ll a) {
	ll cnt = 2;
	while (cnt * cnt <= a) {
		if (a % cnt == 0)ans.insert(cnt), a /= cnt;
		else cnt++;
	}
	if (a != 1)ans.insert(a);
}

vector<ll> era() {
	vector<ll> rtn;
	bool notp[10001] = {};
	notp[0] = true, notp[1] = true;
	for (int i = 2; i <= N; i++) {
		if (!notp[i]) {
			rtn.push_back(i);
			for (int j = i * 2; j <= N; j += i) {
				notp[j] = true;
			}
		}
	}
	return rtn;
}

int main() {
	cin >> N;
	ll g = 0;
	for (int i = 0; i < N + 1; i++) {
		cin >> a[i];
		if (g == 0)g = abs(a[i]);
		else g = gcd(abs(a[i]), g);
	}
	bunkai(g);
	reverse(a, a + N + 1);
	auto prime = era();
	
	for (int i = 0; i < prime.size(); i++) {
		ll P = prime[i];
		//x^P-xでf(x)が割り切れるか？
		vector<ll> b(P, 0);
		for (int j = 0; j < P; j++)b[j] = a[j] % P;
		for (int j = P; j <= N; j++) {
			ll r = j % (P - 1);
			if (r == 0)r = P - 1;
			b[r] = (b[r] + (a[j] % P)) % P;
		}
		for (int j = 0; j < P; j++) {
			if (b[j] != 0)goto next;
		}
		ans.insert(P);
	next:;
	}
	for (auto p : ans) {
		cout << p << endl;
	}
	return 0;
}