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>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
int n, a[10005], t, ac;
bool com[10005];
void gcd(int &a, int b){
	if(a < b) swap(a,b);
	while(b){
		a %= b;
		swap(a,b);
	}
}
int main(){
	scanf("%d", &n);
	rep(i,n+1){
		scanf("%d", a+i);
		gcd(ac,abs(a[i]));
	}
	for(int p = 2; p <= n; p++) if(!com[p]){
		bool ok = a[n] % p == 0;
		rep(i,p-1){
			long long tmp = 0;
			for(int j = i; j < n; j += p-1) tmp += a[j];
			if(tmp % p) ok = false;
		}
		if(ok) printf("%d\n", p);
		for(int t = p*p; t <= n; t += p) com[t] = true;
	}
	for(int p = 2; p*p <= ac; p++) if(ac % p == 0){
		if(n < p) printf("%d\n", p);
		while(ac % p == 0) ac /= p;
	}
	if(ac != 1 && n < ac) printf("%d\n", ac);
}