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>

using namespace std;

typedef long long LL;
#define N 12000

LL n,a[N],b[N];
map<LL,bool> vis;

LL gcd(LL x,LL y){return y==0?x:gcd(y,x%y);}

bool isp(LL x){
	if (x==1) return 0;
	for (LL i=2;i*i<=x;++i) if (x%i==0) return 0;
	return 1;
}

bool chk(LL p){
	for (LL i=0;i<=n;++i) b[i]=a[i]%p;
	for (LL i=n;i>=p;--i){
		(b[i-(p-1)]+=b[i])%=p;
		b[i]=0;
	}
	for (LL i=0;i<=n;++i) if (b[i]) return 0;
	return 1;
}

int main(){
	scanf("%lld",&n);
	LL d=0;
	for (LL i=0;i<=n;++i){scanf("%lld",a+n-i); d=gcd(d,a[i]);}
	d=abs(d);
	for (LL i=2;i*i<=d;++i){
		if (d%i==0){
			vis[i]=1;
			while (d%i==0) d/=i;
		}
	}
	if (d>1) vis[d]=1;
	for (LL i=1;i<=n+1;++i)
		if (isp(i)&&chk(i)) vis[i]=1;
	for (auto i:vis) printf("%lld\n",i.first);
	
	return 0;
}
			