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
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <math.h>
#include <complex>
#include <cassert>
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define case(i) cout<<"Case #"<<i<<": "
using namespace std;
typedef long long int ll;
typedef complex<double> com;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const ll INF = 4e18;

ll gcd(int a, int b) {
	while (a && b) {
		if (a < b) swap(a, b);
		a %= b;
	}
	return max(a,b);
}

bool isPrime(int N)
{
	if (N <= 1) return false;
	if (N == 2) return true;
	if (N % 2 == 0) return false;
	for (int i = 3; i * i <= N; i += 2)
		if (N % i == 0) return false;
	return true;
}

int main() {
	int n; cin >> n;
	vector<int> a(n + 1),ans;
	int g = 0;
	rep(i, 0, n + 1) {
		cin >> a[i];
		g = gcd(g, abs(a[i]));
	}
	int h = g;
	rep(i, 2, sqrt(g) + 1) {
		if (g % i == 0 && isPrime(i)) {
			ans.push_back(i);
			while(g%i==0)g /= i;
		}
	}
	if (g != 1) ans.push_back(g);
	rep(i, 0, n + 1) a[i] /= h;
	rep(p, 0, n + 2) {
		if (isPrime(p) && a[n] % p == 0) {
			vector<int> f = a;
			rep(j, 0, n + 1 - p) {
				f[j+p-1] += f[j];
				f[j] = 0;
			}
			int cnt = 0;
			rep(i, 0, n) {
				if (f[i]%p == 0) cnt++;
			}
			if (cnt==n) ans.push_back(p);
		}
	}
	sort(ans.begin(), ans.end());
	ans.erase(unique(ans.begin(), ans.end()), ans.end());
	rep(i, 0, ans.size()) cout << ans[i] << endl;
	return 0;
}
