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 <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <ctime>
#include <complex>
#include <cassert>
#include <array>
#include <bitset> 
#include <unordered_map>

using namespace std;
typedef long long LL;
typedef pair<int,int> P;
// gcd
LL gcd(LL a, LL b) {
	while(b){
		auto t=a%b;
		a=b;
		b=t;
	}
	return a;
}


const int L=1e4+10;
LL a[L];
bool comp[L];
int main() {
	int N;
	cin >> N;
	for(int i=N;i>=0;i--){
		cin >> a[i];
	}
	LL g=abs(a[N]);
	for(int i=0;i<N;i++){
		g=gcd(g,abs(a[i]));
	}
	vector<int> r;
	for(int i=2;i<L;i++){
		if(comp[i])continue;
		for(int j=i*i;j<L;j+=i){
			comp[j]=true;
		}
		while(g%i==0){
			g/=i;
		}
		if(a[0]%i)continue;
		LL s[L]={};
		for(int j=0;j<=N;j++){
			LL v=a[j]%i;
			if(v<0){
				v+=i;
			}
			s[j%(i-1)]+=v;
		}
		bool ok=true;
		for(int j=0;j<i;j++){
			if(s[j]%i){
				ok=false;
				break;
			}
		}
		if(ok){
			r.push_back(i);
		}
	}
	for(LL i=L;i*i<=g;i++){
		if(g%i==0){
			r.push_back(i);
		}
		while(g%i==0){
			g/=i;
		}
	}
	if(g!=1&&a[0]%g==0){
		r.push_back(g);
	}
	for(auto v:r){
		cout << v << endl;
	}


	return 0;
}

