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 <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <set>
using namespace std;

template <typename Tp> inline void getint(Tp &num){
	register int ch, neg = 0;
	while(!isdigit(ch = getchar())) if(ch == '-') neg = 1;
	num = ch & 15;
	while(isdigit(ch = getchar())) num = num * 10 + (ch & 15);
	if(neg) num = -num;
}

inline int gcd(const int &a, const int &b) {return !b ? a : gcd(b, a % b);}

int N, a[10005], d, sum[10005];
int prm[1255], nprm[10005], pcnt = 0;
set<int> ans;

inline void init(const int &lim){
	nprm[0] = nprm[1] = 1;
	for(register int i = 2; i <= lim; i++){
		if(!nprm[i]) prm[++pcnt] = i;
		for(register int j = 1; j <= pcnt && i * prm[j] <= lim; j++){
			nprm[i * prm[j]] = 1;
			if(i % prm[j] == 0) break;
		}
	}
}

inline void calc1(int d){  // Divisors of GCD of all coef.
	for(register int i = 2; i * i <= d; i++)
		while(d % i == 0) d /= i, ans.insert(i);
	if(d > 1) ans.insert(d);
}

inline void calc2(int p){
	memset(sum, 0, sizeof(int) * (p - 1));
	for(register int i = 0, j; i <= N; i++){
		j = i % (p - 1);
		sum[j] = (sum[j] + a[i]) % p;
	}
	for(register int i = 0; i < p - 1; i++) if(sum[i]) return;
	ans.insert(p);
}

int main(){
	getint(N);
	for(register int i = N; i >= 0; i--) getint(a[i]), d = gcd(d, abs(a[i]));
	calc1(d), init(N);
	for(register int i = 1; i <= pcnt; i++) if(a[0] % prm[i] == 0) calc2(prm[i]);
	for(auto i: ans) printf("%d\n", i);
	return 0;
}