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 <cmath>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
const int S=10004;
const double TW=2*acos(-1.0);
map<int,bool> mp;
vector<int> res;
int n,a[S];
long long b[S];
inline int mi(int a,int b){return a<b?a:b;}
bool pd(int x)
{
	for (int i=n;i>=0;--i) b[i]=a[i];
	for (int i=n;i>=x;--i) b[i-(x-1)]+=b[i];
	for (int i=mi(x-1,n);i>=0;--i)
		if (b[i]%x) return false;
	return true;
}
inline int gcd(int a,int b) {return b?gcd(b,a%b):a;}
inline int ab(int a){return a>0?a:-a;}
inline bool pr(int x)
{
	for (int i=2;i*i<=x;++i)
		if (x%i==0) return false;
	return true;
}
int main()
{
//	freopen("4125.in","r",stdin);
//	freopen("4125.out","w",stdout);
	scanf("%d",&n);
	for (int i=n;i>=0;--i)
		scanf("%d",a+i);
	int g=ab(a[0]);
	for (int i=n;i;--i) g=gcd(g,ab(a[i]));
	for (int i=2;i*i<=g;++i)
		if (g%i==0)
		{
			res.push_back(i);
			mp[i]=true;
			while (g%i==0) g/=i;
		}
	if (g>1) {mp[g]=true;res.push_back(g);}
	for (int i=2;i<=n;++i)
		if (!mp[i] && pr(i) && pd(i))
			res.push_back(i);
	sort(res.begin(),res.end());
	for (int x:res) printf("%d\n",x);
	return 0;
}

