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<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=(mod+1)/2;
const long double EPS=1e-9;
const long double PI=acos(-1.0);
int ABS(int a){return max(a,-a);}
long long ABS(long long a){return max(a,-a);}
long double ABS(long double a){return max(a,-a);}
long long x[110000];
long long y[110000];
vector<int>hb;
int pr[11000];
long long gcd(long long a,long long b){
	while(b){
		a%=b;swap(a,b);
	}return a;
}
int main(){
	int a;scanf("%d",&a);
	for(int i=0;i<=a;i++){
		scanf("%lld",x+i);
	}
	pr[0]=pr[1]=-1;
	for(int i=2;i<10100;i++){
		if(pr[i]==0){
			pr[i]=1;
			hb.push_back(i);
			for(int j=i+i;j<10100;j+=i)pr[j]=-1;
		}
	}
	long long tmp=0;
	for(int i=0;i<=a;i++){
		tmp=gcd(tmp,ABS(x[i]));
	}
	for(int i=2;i*i<=tmp;i++){
		if(tmp%i)continue;
		if(i>10100)hb.push_back(i);
		while(tmp%i==0)tmp/=i;
	}
	if(tmp>10100)hb.push_back(tmp);
	reverse(x,x+a+1);
	for(int i=0;i<hb.size();i++){
		bool ok=true;
		int p=hb[i];
		for(int j=0;j<=a;j++)y[j]=(x[j]%p+p)%p;
		
		for(int j=a;j>=0;j--){
			if(y[j]){
				if(j>=p){
					y[j-p+1]=(y[j-p+1]+y[j])%p;
					y[j]=0;
				}else{
					ok=false;break;
				}
			}
		}

		if(ok)printf("%d\n",hb[i]);
	}
}
