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 it register int
#define ct const int
#define il inline
using namespace std;
const int N=1000005;
int a[N],n,d,p[N],cnt;
bool isp[N];
il void gcd(ct a,ct b){return !b?d=a,void():gcd(b,a%b);}
il bool ck(ct x,ct P){
	it i,now=0;
	for(i=n;~i;--i)
		now=((0ll+now)*x%P+a[i]%P+P)%P;
	return !now;
}
il bool work(ct x){
	if(a[0]%x) return 0;
	it i;
	for(i=1;i<=8;++i) if(!ck(p[i],x)) return 0;
	for(i=1;i<=8;++i) if(!ck(rand()%1000000,x)) return 0;
	return 1;
}
int main(){
	scanf("%d",&n);it i,j,x;
	srand(998244353);
	for(i=n;~i;--i) scanf("%d",&a[i]),gcd(a[i],d);
	d=d<0?-d:d;
	for(i=2;i<=n;++i){
		if(!isp[i]) p[++cnt]=i;
		for(j=1;(x=i*p[j])<=n&&j<=cnt;++j){
			isp[x]=1;
			if(!(i%p[j])) break;
		}
	}
	for(i=2;i*i<=d;++i)
		if(!(d%i)){
			while(!(d%i)) d/=i;
			p[++cnt]=i;
		}
	if(d>1) p[++cnt]=d;
	std::sort(p+1,p+1+cnt),cnt=std::unique(p+1,p+1+cnt)-p-1;
	for(i=1;i<=cnt;++i) if(work(p[i])) printf("%d\n",p[i]);
	return 0;
}