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 <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
#include <queue>
#include <set>
#define maxn 20009
using namespace std;
long long a[maxn], sum = 0;
long long b[maxn];
int n;

long long f(int x){
	return 0;
}

int p[maxn];
bool flag[maxn];
int tot = 0;

set<long long>st;

void init(){
	for(int i = 2; i < maxn; i++){
		if(!flag[i])
			p[tot++] = i;
		for(int j = 0; j < tot && 1LL * i * p[j] < maxn; j++){
			flag[i * p[j]] = 1;
			if(i % p[j] == 0)
				break;
		}
	}
}

long long gcd(long long x, long long y){
	if(x == 0) return y;
	else return gcd(y % x, x);
}

void solve(long long x){
	for(long long i = 2; i * i <= x; i++){
		if(x % i == 0){
			while(x % i == 0){
				x = x / i;
			}
			st.insert(i);
		}
	}
	if(x != 1) st.insert(x);
}

int main(){
	init();
	cin >> n;
	for(int i = n; i >= 0; i--)
		cin >> a[i];
	
	for(int i = 0; i < tot; i++){
		bool ok = 1;
		for(int j = 0; j < p[i]; j++)
			b[j] = 0;
		if(abs(a[0]) % p[i] != 0) ok = 0;
		for(int j = 0; j <= n; j++){
			b[j % (p[i] - 1)] += a[j];
		}
		for(int j = 0; j < p[i]; j++){
			b[j] %= p[i];
			if(b[j] != 0){
				ok = 0;
				break;
			}
		}
		if(ok == 1){
			st.insert(p[i]);
		}
	}
	
	long long g = 0;
	for(int i = 0; i <= n; i++)
		g = gcd(g, abs(a[i]));
	
	
	solve(g);
	
	for(auto it = st.begin(); it != st.end(); ++it){
		cout << (*it) << endl;
	}
	return 0;
}
