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<string.h>
#include<string>
#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
using namespace std;
#define lowbit(x) (x)&(-x)
#define rep(i,a,b) for (int i=a;i<=b;i++)
#define per(i,a,b) for (int i=a;i>=b;i--)
#define maxd 1000000007
typedef long long ll;
const int N=100000;
const double pi=acos(-1.0);
int n,tot=0,pri[1001000],a[10100],tax[10100];
bool ispri[10100];
set<int> ans; 

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

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

int gcd(int x,int y)
{
	if (!y) return x;else return gcd(y,x%y);
}

bool chk(int p)
{
	if (a[0]%p) return 0;
	rep(i,0,p-2) tax[i]=0;
	rep(i,0,n) tax[i%(p-1)]=(tax[i%(p-1)]+a[i])%p;
	rep(i,0,p-2) if (tax[i]) return 0;
	return 1;
}

int main()
{
	n=read();sieve(n);
	per(i,n,0) a[i]=read();
	int now=0;
	rep(i,0,n)
	{
		if (a[i])
		{
			if (!now) now=abs(a[i]);
			else now=gcd(abs(a[i]),now);
		}
	}
	now=abs(now);
	
	int rest=now,i;
	for (i=2;i*i<=now;i++)
	{
		if (rest%i) continue;
		while (rest%i==0) rest/=i;
		ans.insert(i);
	}
	
	if (rest>1) ans.insert(rest);
	rep(i,1,tot) if (chk(pri[i])) ans.insert(pri[i]);
	set<int>::iterator it=ans.begin();
	while (it!=ans.end())
	{
		printf("%d\n",*it);
		it++;
	}
	return 0;
}
