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 fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i,u) for (register int i=head[u]; i; i=nxt[i])
#define rep(i,a,b) for (register int i=(a); i<=(b); i++)
#define per(i,a,b) for (register int i=(a); i>=(b); i--)
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int,int> Pii;
typedef vector<int> Vi;
template<class T> inline void read(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+c-'0'; c=getchar();} x*=f;
}
template<class T> inline void umin(T &x, T y){x=x<y?x:y;}
template<class T> inline void umax(T &x, T y){x=x>y?x:y;}
inline ui R() {
	static ui seed=416;
	return seed^=seed>>5,seed^=seed<<17,seed^=seed>>13;
}
const int N = 10200;
int n,a[N],b[N];set<int>Set;
int gcd(int a, int b){return !b?a:gcd(b,a%b);}
bool isprime(int x){
	for(int i=2;i*i<=x;i++)if(x%i==0)return 0;
	return 1;
}
inline bool ck(int p){
	rep(i,0,n)b[i]=a[i]%p;
	per(i,n,p)if(b[i]){
		b[i-p+1]=(b[i-p+1]+b[i])%p;b[i]=0;
	}
	rep(i,0,p-1)if(b[i])return 0;
	return 1;
}
int main() {
	read(n);per(i,n,0)read(a[i]);
	int g=0;rep(i,0,n)g=gcd(g,a[i]);g=g>0?g:-g;
	for(int i=2;i*i<=g;i++)if(g%i==0){
		Set.insert(i);while(g%i==0)g/=i;
	}
	if(g>1)Set.insert(g);
	rep(i,2,n)if(isprime(i)&&ck(i))Set.insert(i);
	while(!Set.empty())
		printf("%d\n",*Set.begin()),Set.erase(Set.begin());
	return 0;
}
