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<cstdio>
#include<vector>
#include<algorithm>
using namespace std;

const int N = 10005;

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

int n, a[N], np[N], p[N];
vector<int> out;

void work()
{
	int u = a[0];
	for(int i = 1; i <= n; ++i)
		u = gcd(u, abs(a[i]));
	if(u)
	{
		for(int i = 0; i <= n; ++i)
			a[i] /= u;
	}
	for(int x = 2; x * x <= u; ++x)
		if(u % x == 0)
		{
			out.push_back(x);
			for(; u % x == 0; u /= x);
		}
	if(u > 1)
		out.push_back(u);
}

void work2()
{
	for(int j = 1; j <= p[0]; ++j)
	{
		vector<long long> po(a, a + n + 1);
		for(int k = n; k >= p[j]; --k)
			po[k - p[j] + 1] += po[k];
		int ok = 1;
		for(int k = 0; k < p[j]; ++k)
			if(po[k] % p[j])
			{
				ok = 0;
				break;
			}
		if(ok)
			out.push_back(p[j]);
	}
}

int main()
{
	scanf("%d", &n);
	for(int i = 0; i <= n; ++i)
		scanf("%d", &a[n - i]);
	for(int i = 2; i <= n; ++i)
	{
		if(!np[i])
			p[++p[0]] = i;
		for(int j = 1; j <= p[0] && i * p[j] <= n; ++j)
		{
			np[i * p[j]] = 1;
			if(i % p[j] == 0) break;
		}
	}
	work();
	work2();
	sort(out.begin(), out.end());
	out.erase(unique(out.begin(), out.end()), out.end());
	for(auto p : out)
		printf("%d\n", p);
	return 0;
}