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 pii pair<int,int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define eps 1e-10
#define MAXN 10005
//#define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef double db;
template<class T>
void read(T &res) {
    res = 0;T f = 1;char c = getchar();
    while(c < '0' || c > '9') {
	if(c == '-') f = -1;
	c = getchar();
    }
    while(c >= '0' && c <= '9') {
	res = res * 10 +c - '0';
	c = getchar();
    }
    res *= f;
}
template<class T>
void out(T x) {
    if(x < 0) {x = -x;putchar('-');}
    if(x >= 10) {
	out(x / 10);
    }
    putchar('0' + x % 10);
}
set<int> S;
int g;
int N,a[MAXN],b[MAXN],c[MAXN];
int prime[MAXN],tot;
bool nonprime[MAXN];
int gcd(int a,int b) {
    return  b == 0 ? a : gcd(b,a % b);
}
void Solve() {
    read(N);
    for(int i = N ; i >= 0 ; --i) {
	read(a[i]);
	g = gcd(g,abs(a[i]));
    }
    for(int i = 2 ; i <= g / i ; ++i) {
	if(g % i == 0) {
	    S.insert(i);
	    while(g % i == 0) g /= i;
	}
    }
    if(g > 1) S.insert(g);
    for(int i = 2 ; i <= 10000 ; ++i) {
	if(!nonprime[i]) {
	    prime[++tot] = i;
	}
	for(int j = 1 ; j <= tot ; ++j) {
	    if(1LL * i * prime[j] > 10000) break;
	    nonprime[i * prime[j]] = 1;
	    if(i % prime[j] == 0) break;
	}
    }
    for(int i = 1 ; i <= tot ; ++i) {
	if(prime[i] > N) break;
	int p = prime[i];
	if(S.find(p) != S.end()) continue;
	memset(b,0,sizeof(b));
	memset(c,0,sizeof(c));
	bool flag = 1;
	for(int i = N ; i >= 0 ; --i) {
	    b[i] = (a[i] + c[i]) % p;
	    if(i >= p) {
		c[1 + i - p] += b[i];
		c[1 + i - p] %= p;
	    }
	    else if(b[i]){
		flag = 0;break;
	    }
	}
	if(flag) S.insert(p);
    }
    for(auto t : S) {
	out(t);enter;
    }
}
int main() {
#ifdef ivorysi
    freopen("f1.in","r",stdin);
#endif
    Solve();
}
