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 <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const int MAX=11000;
vector<ll> prime;
bool isprime[MAX];
void sieve(){
	for(ll i=3; i<MAX; i+=2){
		isprime[i]=1;
	}
	isprime[2]=1;
	prime.push_back(2);
	for(ll i=3; i<MAX; i++){
		if(isprime[i]){
			prime.push_back(i);
			for(ll j=2*i; j<MAX; j+=i){
				isprime[j]=0;
			}
		}
	}
	return;
}
ll gcd(ll a, ll b){
    if(b==0) return a;
    return gcd(b, a%b);
}
void div(vector<ll> &v, ll p){
    while(!v.empty() && v.back()==0) v.pop_back();
    if(v.size()<=p-1) return;
    int n=v.size();
    ll a=v.back();
    v.pop_back();
    v[n-p]=(v[n-p]+a)%p;
    div(v, p);
}
int main()
{
    int n; cin>>n;
    sieve();
    ll a[10001];
    ll g=0;
    for(int i=n; i>=0; i--){
        cin>>a[i];
        g=gcd(abs(a[i]), g);
    }
    for(int i=0; i<=n; i++) a[i]/=g;
    vector<ll> ans;
    for(ll i=2; i*i<=g; i++){
        if(g%i==0){
            while(g%i==0) g/=i;
            ans.push_back(i);
        }
    }
    if(g>1) ans.push_back(g);
    for(int i=0; prime[i]<=n; i++){
        ll p=prime[i];
        if(a[0]%p!=0) continue;
        vector<ll> v;
        for(int i=0; i<=n; i++){
            v.push_back((a[i]%p+p)%p);
        }
        div(v, p);
        if(v.empty()) ans.push_back(p);
    }
  if(ans.empty()){
    cout<<endl; return 0;
  }
    sort(ans.begin(), ans.end());
    ans.erase(unique(ans.begin(), ans.end()), ans.end());
    for(auto p:ans) cout<<p<<endl;
    return 0;
}