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	LL long long
using namespace std;
template <typename T> void read(T &x){
	x = 0; int f = 1; char ch = getchar();
	while (!isdigit(ch)) {if (ch == '-') f = -1; ch = getchar();}
	while (isdigit(ch)) {x = x * 10 + ch - '0'; ch = getchar();}
	x *= f;
}
inline void write(int x){ if (x>9) write(x/10); putchar('0'+x%10); }
const int N = 10050;
inline LL gcd(LL x,LL y){ return y ? gcd(y,x%y) : x; }
int n,a[N],ans[N+500],m;
inline void Divide(LL x){
	int i; LL t=x;
	for (i = 2; i <= x / i; ++i) if (t%i==0){ ++m; ans[m] = i; while (t%i==0) t/=i; }
	if (t>1) ++m,ans[m] = t; sort(ans+1,ans+m+1);
}
LL vval;
int b[N];
inline bool check(int p){
	int i,j; LL ret;
	if (vval%p!=0) return 0;
	for (i = 2; i * i <= p; ++i) if (p%i==0) return 0;
	//x^p-x
	for (i = 1; i <= n; ++i) b[i] = a[i]%p,b[i]<0?b[i]+=p:0;
	for (i = 1; i <= n; ++i) if (b[i]){
		if (i+p-1>n) return 0;
		b[i+p-1] += b[i];
		b[i+p-1] >= p ? b[i+p-1] -= p : 0;
	}
	return 1;
}
int main(){
	int i,v; LL v0,v1,vf1;
	read(n);
	for (i = n; i >= 0; --i) read(a[i]);
	for (v = abs(a[0]),i = 1; i <= n; ++i) v = gcd(v,abs(a[i]));
	Divide(v);
	v0 = abs(a[0]),v1 = vf1 = 0;
	for (i = 0; i <= n; ++i) v1 += a[i];
	for (i = 0; i <= n; ++i) if (i%2==0) vf1 += a[i]; else vf1 -= a[i];
	v1 = abs(v1),vf1 = abs(vf1),vval = gcd(gcd(v0,v1),vf1);
	for (i = 1; i <= n; ++i) a[i] /= v;
	for (i = 2; i <= n; ++i) if (check(i)) ans[++m] = i;
	sort(ans+1,ans+m+1); m = unique(ans+1,ans+m+1)-ans-1;
	for (i = 1; i <= m; ++i) write(ans[i]),putchar('\n');
	return 0;
}