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 <queue>
#include <cmath>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstring>
#include <iostream>
#include <algorithm>
#define set0(x) memset(x,0,sizeof(x))
#define FF first
#define SS second
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
template<typename T> void read(T &x){
	x = 0;char ch = getchar();int f = 1;
	while(!isdigit(ch)){if(ch == '-')f*=-1;ch=getchar();}
	while(isdigit(ch)){x = x*10+ch-48;ch=getchar();}x*=f;
}
int gcd(int a,int b){
	if(b == 0)return a;
	return gcd(b,a%b);
}
int n,a[10010],b[10010],isnp[10010] = {0};
bool test(int p){
	//cout<<p<<endl;
	for(int i=0;i<=n;i++)b[i] = a[n-i];
	//for(int i=0;i<=n;i++) cout<<"::"<<b[i]<<endl;
	for(int i=n;i>=p;i--){
		//cout<<i<<' '<<i-p+1<<endl;
		b[i-p+1]= b[i-p+1]+b[i];
	}
	//for(int i=0;i<=n;i++) cout<<"--"<<b[i]<<endl;
	for(int i=0;i<p;i++){
		//cout<<"  "<<b[i]<<endl;
		if(b[i]%p!=0)return false;
	}
	return true;
}
vector<int> ans;
int main() {
	read(n);
	int cc = 0;
	for(int i=0;i<=n;i++){
		read(a[i]);
		cc = gcd(abs(a[i]),cc);
	}
	for(ll i=2;i*i<=cc;i++){
		if(cc%i == 0){
			ans.push_back(i);
			while(cc%i == 0)cc/=i;
		}
	}
	if(cc!=1)ans.push_back(cc);
	for(int i=2;i<=n;i++){
		if(!isnp[i]){
			//cout<<i<<endl;
			if(test(i)){
				ans.push_back(i);
			}
			for(int j=i+i;j<=n;j+=i)isnp[j] = 1;
		}
	}
	sort(ans.begin(),ans.end());
	if(ans.size()){
		cout<<ans[0]<<'\n';
		for(int i=1;i<ans.size();i++){
		if(ans[i]!=ans[i-1])cout<<ans[i]<<'\n';
		}
	}
	return 0;
}
