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 <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#define PB push_back
#define ll long long
using namespace std;
template <class T>
inline void rd(T &x)
{
	x=0; char c=getchar(); int f=1;
	while(!isdigit(c)){if(c=='-')f=-1; c=getchar();}
	while(isdigit(c)) x=x*10-'0'+c,c=getchar(); x*=f;
}
const int N=1e4+10;
vector<int> ans;
int n,a[N];
int gcd(int a,int b) { return b?gcd(b,a%b):a; }
int pri[N],flg[N],num;
void getpri(int n) {
	for(int i=2;i<=n;++i) {
		if(!flg[i]) pri[num++]=i;
		for(int j=0;j<num&&pri[j]*i<=n;++j) {
			flg[i*pri[j]]=1;
			if(i%pri[j]==0) break;
		}
	}
}

int main() {
	rd(n);
	int g=0;
	for(int i=n;i>=0;--i) rd(a[i]),g=gcd(a[i],g);
	if(g<0) g=-g;
	for(int i=2;i*(ll)i<=g;++i) if(g%i==0) {
		while(g%i==0) g/=i;
		ans.PB(i);
	}
	if(g>1) ans.PB(g);
	getpri(n);
	for(int j=0;j<num;++j) {
		if(a[0]%pri[j]) continue;
		int p=pri[j],p1=pri[j]-1,flg=1;
		for(int j=0;j<p1;++j) {
			int tmp=0;
			for(int i=j;i<=n;i+=p1)
				tmp=(tmp+a[i])%p;
			if(tmp!=0) { flg=0; break; }
		}
		if(flg) ans.PB(pri[j]);
	}
	sort(ans.begin(),ans.end());
	int m=unique(ans.begin(),ans.end())-ans.begin();
	for(int i=0;i<m;++i) printf("%d\n",ans[i]);
	return 0;
}