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>
#define maxn 10010
using namespace std;
int cnt, p[maxn], n, a[maxn], b[maxn];
int gcd(int a, int b)
{
	if (a == 0) return b;
	if (b == 0) return a;
	int y = a % b;
	while (y)
	{
		a = b;
		b = y;
		y = a % b;
	}
	return b;
}
bool prime(int x)
{
	if (x == 1) return false;
	for (int i = 2; i <= sqrt(x); i++)
		if (x % i == 0) return false;
	return true;
}
bool check(int x)
{
	if (x > n + 1) return true;
	for (int i = 0; i <= n; i++)
		b[i] = (a[i] % x + x) % x;
	for (int i = n; i >= x; i--)
	{
		int tmp = b[i], pos;
		pos = i - x + 1;
		b[pos] = (b[pos] + tmp) % x;
	}
	for (int i = x - 1; i >= 0; i--)
		if (b[i] % x) return false;
	return true;
}
int main()
{
	int g = 0;
	scanf("%d", &n);
	for (int i = 2; i <= n; i++)
		if (prime(i)) p[++cnt] = i;
	for (int i = n; i >= 0; i--)
	{
		scanf("%d", &a[i]);
		g = gcd(abs(a[i]), g);
	}
	for (int i = 2; i * i <= g; i++)
		if (g % i == 0)
		{
			p[++cnt] = i;
			while (g % i == 0) g /= i;
		}
	if (g != 1) p[++cnt] = g;
	sort(p + 1, p + cnt + 1);
	for (int i = 1; i <= cnt; i++)
		if (p[i] != p[i - 1] && check(p[i])) printf("%d\n", p[i]);
	return 0;
}