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 <algorithm>
using namespace std;

#define File(s) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)

int gcd(int x, int y){
	int t;
	while(y) t = x, x = y, y = t % y;
	return x;
}

const int N = 20005, PR = 32000;
int res[N], rc = 0;

int a[N], b[N], p[PR], pc = 0;
bool np[PR];

void primeList(int n){
	for(int i=2; i<=n; i++){
		if(!np[i]) p[++pc] = i;
		for(int j=1; j<=pc && i * p[j] <= n; j++){
			np[i * p[j]] = true;
			if(i % p[j] == 0) break;
		}
	}
}

int main(){
	// File("4125");
	primeList(31622);
	int n, d = 0;
	scanf("%d", &n);
	for(int i=n; i>=0; i--){
		scanf("%d", a + i);
		d = gcd(abs(a[i]), d);
	}
	for(int i=1; i<=pc; i++){
		if(d % p[i] == 0) res[++rc] = p[i];
		while(d % p[i] == 0) d /= p[i];
		if(a[0] % p[i] == 0 && p[i] <= n){
			for(int j=1; j<=n; j++) b[j] = (a[j] % p[i] + p[i]) % p[i];
			for(int j=n; j>=p[i]; j--)
				b[j - p[i] + 1] = (b[j - p[i] + 1] + b[j]) % p[i];
			bool flag = true;
			for(int j=1; j<p[i]; j++)
				if(b[j] != 0){
					flag = false;
					break;
				}
			if(flag) res[++rc] = p[i];
		}
	}
	if(d != 1) res[++rc] = d;
	sort(res + 1, res + 1 + rc);
	res[0] = 0;
	for(int i=1; i<=rc; i++)
		if(res[i] != res[i - 1]) printf("%d\n", res[i]);
	return 0;
}