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 <iomanip>
#include <ios> 
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <bitset>
#include <map>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define sz(c) ((int)(c).size())

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
const int MAX=1e4+5;

int prime[40005];
bool isp[40005];

int main(){
	int N;
	cin>>N;
	int a[MAX];
	for(int i=N;i>=0;i--)cin>>a[i];
  
	int n=40000;
	int p = 0;
	//初期化
	for(int i=0;i<=n;i++)
		isp[i]=true;
	isp[0]=isp[1]=false;
	//2以上で素数ならふるい落とす
	for(int i=2;i<=n;i++){
		if(isp[i]){
			p++;
			prime[p]=i;
			for(int j=2*i;j<=n;j+=i) isp[j]=false;
		}
	}
	
	vi apr={};
	int x=abs(a[N]);
	rep1(i,35000){
      	int q=i+1;
		if(x%q==0){
			apr.push_back(q);
			while(x%q==0)x/=q;
		}
	}
  	if(x!=1)apr.push_back(x);
	
	set<int> ans;
	rep1(q,N)if(isp[q]){
		int b[MAX];
		rep(i,N+1)b[i]=a[i];
		for(int i=N;i>=q;i--){
			b[i-q+1]+=b[i];
		}
		bool ok=true;
		rep(i,q)if(b[i]%q!=0)ok=false;
		if(ok)ans.insert(q);
    }
	int l=sz(apr);
	rep(i,l){
		int q=apr[i];
		int b[MAX];
		rep(i,N+1)b[i]=a[i];
      	if(q<=N){
			for(int i=N;i>=q;i--){
				b[i-q+1]+=b[i];
			}
        }
		bool ok=true;
		rep(i,min(q,N))if(b[i]%q!=0)ok=false;
		if(ok)ans.insert(q);
	}
	
	for(auto itr = ans.begin(); itr != ans.end(); ++itr) {
        cout << *itr <<endl;
    }
}