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
#pragma GCC optimize(3)
#include <queue>
#include <vector>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define ll long long
using namespace std;

template <typename T>
void read(T &x) {
    x = 0; bool f = 0;
    char c = getchar();
    for (;!isdigit(c);c=getchar()) if (c=='-') f=1;
    for (;isdigit(c);c=getchar()) x=x*10+(c^48);
    if (f) x=-x;
}

template <typename T>
void write(T x) {
    if (x < 0) putchar('-'), x = -x;
    if (x >= 10) write(x / 10);
    putchar('0' + x % 10);
}

const int N = 100500;
ll a[N], n;

int prime[N], e[N], tot;
void prework(void) {
	const int Maxn = 100050;
	for (int i = 2;i <= Maxn; i++) {
		if (!e[i]) e[i] = prime[++tot] = i;
		for (int j = 1;j <= tot && prime[j] * i <= Maxn; j++) {
			e[prime[j] * i] = prime[j];
			if (prime[j] >= e[i]) continue;
		}
	}
}

ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }

ll b[N];
bool check(int P) {
	if (a[0] % P) return false;
	for (register int i = 0;i <= n; i++) b[i] = a[i];
	for (register int i = n;i >= P - 1; i--) 
		(b[i-P+1] += b[i]) %= P, b[i] = 0;
	for (register int i = 0;i <= n; i++) 
		if (b[i] % P) return false;
	return true;
}

vector<int> res;

int main() {
	prework(); read(n); ll ans = 0;
	for (int i = n;i >= 0; i--) {
		read(a[i]); ans = gcd(a[i] > 0 ? a[i] : -a[i], ans);
	}
	
	for (int i = 2;i * i <= ans; i++) 
		while (ans % i == 0) ans /= i, res.push_back(i);
	if (ans != 1) res.push_back(ans); 
	
	for (int i = 1;i <= tot; i++) {
		if (prime[i] > n) break;
		if (check(prime[i])) res.push_back(prime[i]);
	}
	sort(res.begin(), res.end());
	res.erase(unique(res.begin(), res.end()), res.end());
	for (int i = 0;i < res.size(); i++) printf ("%d\n", res[i]);
	return 0;
}