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 fio ios_base::sync_with_stdio(false)
#define pdl cout << "*" << endl
#define MOD 1000000007
#define INF 1000000000
#define INFLL 1000000000000000000ll
#define pb push_back
#define ff first
#define ss second
#define long int64_t
using namespace std;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
uniform_int_distribution<> dis(0, INF<<1);
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void __f(const char* name, Arg1&& arg1){ cerr << name << " : " << arg1 << endl; }
template <typename Arg1, typename... Args> void __f(const char* names, Arg1&& arg1, Args&&... args)
{ const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma+1, args...); }

const int N = 10001;

int gcd(int a, int b)
{
	while(b)
	{
		a %= b;
		swap(a, b);
	}
	return a;
}

int s[N], a[N], t[N];

bool check(int p, int n)
{
	memset(t, 0, sizeof t);
	for(int i=n; i>=p; i--)
	{
		int x = (a[i] + t[i]) % p;
		t[i - p + 1] += x;
		t[i - p + 1] %= p;
	}
	for(int i=p-1; i>=0; i--)
		if((a[i] + t[i]) % p)
			return false;
	return true;
}

int main()
{
	fio;
	int n, g = 0;
	cin >> n;
	for(int i=n; i>=0; i--)
	{
		cin >> a[i];
		g = gcd(abs(a[i]), g);
	}
	set<int> ans;
	for(int i=2; i*i<=g; i++)
	{
		if(g % i == 0)
		{
			ans.insert(i);
			while(g % i == 0)
				g /= i;
		}
	}
	if(g > 1)
		ans.insert(g);
	for(int i=2; i<=n; i++)
	{
		if(s[i] == 0)
		{
			if(check(i, n))
				ans.insert(i);
			for(int j=i+i; j<=n; j+=i)
				s[j] = 1;
		}
	}
	for(int it : ans)
		cout << it << endl;
	return 0;
}