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 <iostream>
#include <set>
#define llint long long
 
using namespace std;
 
llint n;
llint a[10005], b[10005];
set<llint> S;
 
int main(void)
{
	cin >> n;
	for(llint i = n; i >= 0; i--) cin >> b[i];
	
	llint k = 0;
	for(llint i = 0; i <= n; i++){
		if(b[i]){
			k = i;
			break;
		}
	}
	for(llint i = 0; i <= n-k; i++) a[i] = b[i+k];
	n -= k;
	
	llint m = abs(a[0]);
	for(llint i = 1; i*i <= m; i++){
		if(m%i) continue;
		S.insert(i), S.insert(m/i);
	}
	for(int i = 1; i <= n+1; i++) S.insert(i);
	
	for(auto p : S){
		bool flag = true;
		if(p == 1) flag = false;
		for(llint i = 2; i*i <= p; i++){
			if(p % i == 0){
				flag = false;
				break;
			}
		}
		if(!flag) continue;
		
		for(llint i = 0; i <= n; i++){
			b[i] = a[i];
			if(b[i] < 0) b[i] = p - (-b[i]) % p;
			b[i] %= p;
		}
		for(llint i = n; i >= p-1; i--){
			if(b[i] == 0) continue;
			if(k == 0 && i == p-1) continue;
			b[i-(p-1)] += b[i], b[i-(p-1)] %= p;
			b[i] = 0;
		}
		
		flag = true;
		for(llint i = 0; i <= n; i++){
			if(b[i]) flag = false;
		}
		if(flag) cout << p << endl;
	}
	return 0;
}