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 <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <random>
#include <unordered_map>
#include <unordered_set>
#define all(a) a.begin(),a.end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define pb push_back
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
typedef complex<ld> com;
constexpr int inf = 1000000010;
constexpr ll INF = 1000000000000000010;
constexpr ld eps = 1e-12;
constexpr ld pi = 3.141592653589793238;
template<class T, class U> inline bool chmax(T &a, const U &b) { if (a < b) { a = b; return true; } return false; }
template<class T, class U> inline bool chmin(T &a, const U &b) { if (a > b) { a = b; return true; } return false; }
ll gcd(ll n, ll m) { return (m ? gcd(m, n%m) : n); }


signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);

	int n;
	cin >> n;
	vector<int> a(n + 1);
	rep(i, n + 1) cin >> a[i];
	reverse(all(a));
	set<int> ans;
	int g = 0;
	rep(i, n + 1) 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);
	for (int p = 2; p < 10010; p++) {
		bool prime = true;
		for (int i = 2; i*i <= p; i++) if (p%i == 0) prime = false;
		if (prime) {
			if (a[0] % p != 0) continue;
			vector<ll> cnt(p - 1);
			rep(i, n + 1) cnt[i % (p - 1)] += a[i];
			bool flag = true;
			rep(i, p - 1) if (cnt[i] % p != 0) { flag = false; break; }
			if (flag) ans.insert(p);
		}
	}
	for (int i : ans) cout << i << '\n';
}