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 <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
typedef double db;
typedef long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;

const int N=5e4+10;

int gcd(int x,int y) {return y?gcd(y,x%y):x;}

int vis[N],ps[N],tn;
void sieve(int n) {
	rep(i,2,n+1) {
		if (!vis[i]) ps[tn++]=i;
		for (int j=0;j<tn&&i*ps[j]<=n;j++) {
			vis[i*ps[j]]=1;
			if (i%ps[j]==0) break;
		}
	}
}

int a[N],n;

bool check(int p) {
	if (a[0]%p) return false;
	// printf("%d: ",p);
	static int f[N];
	rep(i,0,n+1) f[i]=(a[i]%p+p)%p;
	per(i,0,n-p+1) {
		int j=i+p;
		f[i+1]=(f[i+1]+f[j])%p;
		f[j]=0;
	}
	// rep(i,0,n+1) printf("%d ",f[i]); puts("");
	rep(i,0,n+1) if (f[i]) return false;
	return true;
}

set<int> ans;

int main() {
#ifdef LOCAL
	freopen("a.in","r",stdin);
#endif
	scanf("%d",&n),sieve(n);
	int g=0;
	per(i,0,n+1) scanf("%d",&a[i]),g=gcd(g,abs(a[i]));
	for (int i=2;i*i<=g;i++) {
		if (g%i==0) {
			ans.insert(i);
			while (g%i==0) g/=i;
		}
	}
	if (g!=1) ans.insert(g);
	rep(i,0,tn) if (check(ps[i])) ans.insert(ps[i]);
	for (auto p:ans) printf("%d\n",p);
	return 0;
}