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 syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

ll gcd(ll a,ll b){
	if(!b) return a;
	return gcd(b,a%b);
}

ll n;
vl a,c,d;

int main(){
	cin>>n;
	a=d=vl(n+1);
	ll g=0;
	fill(d.begin(),d.end(),1);
	for(auto &i:a){
		cin>>i;
		g=gcd(g,abs(i));
	}
	for(int i=2;i<=n;i++) if(d[i]){
		for(int j=2*i;j<=n;j+=i) d[j]=0;
		if(abs(a[n])%i==0){
			vl b(i-1);
			for(int j=0;j<n;j++) b[j%(i-1)]+=a[j];
			bool B=1;
			for(auto j:b) if(abs(j)%i!=0) B=0;
			if(B) c.push_back(i);
		}
	}
	for(int i=2;i*i<=g;i++) if(g%i==0){
		c.push_back(i);
		while(g%i==0) g/=i;
	}
	if(g>1) c.push_back(g);
	sort(c.begin(),c.end());
	c.erase(unique(c.begin(),c.end()),c.end());
	for(auto i:c) cout<<i<<endl;
}