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<cmath>
#include<set>
#define rep(i, a, b) for (register int i=(a); i<=(b); ++i)
#define per(i, a, b) for (register int i=(a); i>=(b); --i)
void add(int &x, int y, int P){x=(x+y)%P;}
using namespace std;
const int N=10005;
int vis[N], p[N], sum[N], a[N], cnt, n;
set<int> ans;

inline int read()
{
    int x=0,f=1;char ch=getchar();
    for (;ch<'0'||ch>'9';ch=getchar()) if (ch=='-') f=-1;
    for (;ch>='0'&&ch<='9';ch=getchar()) x=(x<<1)+(x<<3)+ch-'0';
    return x*f;
}

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

int gcd(int a, int b){return b?gcd(b, a%b):a;}

void factor(int x)
{
	for (int i=2; i*i<=x; i++) 
		while (x%i==0) x/=i, ans.insert(i);
	if (x>1) ans.insert(x);
}

void check(int p)
{
	rep(i, 0, p-2) sum[i]=0;
	rep(i, 0, n) add(sum[i%(p-1)], a[i], p);
	rep(i, 0, p-2) if (sum[i]) return; 
	ans.insert(p);
}

int main()
{
	n=read(); sieve(n); int g=0; 
	per(i, n, 0) 
	{
		a[i]=read();
		if (a[i]) g=gcd(g, abs(a[i]));
	}
	factor(g); 
	rep(i, 1, cnt) if (a[0]%p[i]==0) check(p[i]);
	for (int x: ans) printf("%d\n", x);
	return 0;
}
