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;
bool is_prime(int x){
	if(x <= 1) return false;
	for(int i = 2; i * i <= x; i++) if(x % i == 0) return false;
	return true;
}
int gcd(int a, int b){
	while(b){
		a %= b;
		swap(a, b);
	}
	return a;
}
int main(){
	int n; cin >> n;
	vector<int> a(n + 1);
	for(int i = n; i >= 0; i--) cin >> a[i];
	vector<int> chk;
	for(int i = 2; i <= n; i++) if(is_prime(i)) chk.push_back(i);
	int G = 0;
	for(int i = n; i >= 0; i--) if(abs(a[i])) G = gcd(abs(a[i]), G);
	for(int i = 1; i*i <= G; i++){
		if(G % i == 0){
			if(is_prime(i)) chk.push_back(i);
			if(is_prime(G/i) && i != G/i) chk.push_back(G/i);
		}
	}
	sort(chk.begin(), chk.end());
	chk.erase(unique(chk.begin(), chk.end()), chk.end());
	for(int ch : chk){
		if(ch > n){
			int i;
			for(i = n; i >= 0; i--) if(a[i] % ch) break;	
			if(i == -1) cout << ch << endl;
		} else {
			vector<int> b = a; int len = n;
			for(int i = len; i >= 0; i--){
				b[i] %= ch;
				b[i] += ch;
				b[i] %= ch;
			}
			while(len >= ch){
				if(b[len] == 0){
					len--;
					continue;
				}
				b[len - ch + 1] += b[len];
				b[len - ch + 1] %= ch;
				len--;
			}
			for(; len >= 0; len--) if(b[len] % ch) break;
			if(len == -1) cout << ch << endl;
		}
	}
	return 0;
}
