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(long long n){
	if(n == 1) return false; 
	if(n == 2 || n == 3) return true; 
	if(n % 6 != 1 && n % 6 != 5) return false; 
	for(long long i = 2; i * i <= n; i++){
		if(n % i == 0) return false; 
	}
	return true; 
}
long long gcd(long long a, long long b){
	return (b > 0)? gcd(b, a % b) : a ;
}
int main(){
	int N; cin >> N; 
	long long A[10010]; 
	for(int i = N; i >= 0; i--) cin >> A[i]; 
	long long G = abs(A[N]);
	for(int i = 0; i < N; i++) G = gcd(G, abs(A[i])); 
	set<long long> ans; 
	long long tmp = G; 
	for(long long i = 2; i * i <= G; i++){
		if(tmp % i == 0){
			ans.insert(i); 
			while(tmp % i == 0) tmp /= i; 
		}
	}
	if(tmp != 1) ans.insert(tmp); 
	for(long long i = 2; i <= 10000; i++){
		if(!is_prime(i)) continue; 
		if(A[0] % i != 0) continue; 
		long long C[10010] = {}; 
		for(int j = 1; j <= N; j++){
			C[j % (i-1)] += A[j]; 
		}
		bool ok = true; 
		for(int j = 0; j < i-1; j++){
			if(abs(C[j]) % i){
				ok = false; break; 
			}
		}
		if(ok) ans.insert(i); 
	}
	for(auto it = ans.begin(); it != ans.end(); it++) cout << *it << "\n"; 
}