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 <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <utility>
#include <cstdlib>
#define maxn 10005
using namespace std;
typedef long long ll;
inline int getint(){
  char c; int res = 0, sig = 1;
  for(c = getchar();c < '0' || c > '9';c = getchar()) if(c == '-') sig = -1;
  for(;c >= '0' && c <= '9';c = getchar()) res = res * 10 + (c - '0');
  return res * sig;
}
int n,a[maxn],b[maxn];
int pri[1235],k;
bool notp[maxn];
int gcd(int x,int y){
  return y ? gcd(y,x % y) : x;
}
bool ok(int p){
  //b: tmp
  for(int i = n;i >= 0;i--) b[i] = a[i];
  for(int i = n;i >= p;i--){
    (b[i - p + 1] += b[i]) %= p;
    b[i] = 0;
  }
  for(int i = min(n,p - 1);i >= 0;i--){
    if(b[i] % p) return false;
  }
  return true;
}
int main(){
  n = getint();
  notp[1] = true;
  for(int i = 2;i <= n;i++){
    if(!notp[i]) pri[++k] = i;
    for(int j = 1;j <= k && pri[j] * i <= n;j++){
      notp[pri[j] * i] = true;
      if(i % pri[j] == 0) break;
    }
  }
  for(int i = n;i >= 0;i--){
    a[i] = getint();
  }
  vector <int> ans;
  for(int i = 1;i <= k;i++) if(ok(pri[i])) ans.push_back(pri[i]);
  int tmp = 0;
  for(int i = n;i >= 0;i--) tmp = gcd(tmp,abs(a[i]));
  for(int i = 2;(ll)i * i <= (ll)tmp;i++){
    if(tmp % i == 0){
      if(i > n) ans.push_back(i);
      while(tmp % i == 0) tmp /= i;
    }
  }
  if(tmp > 1){
    if(ok(tmp) && tmp > n) ans.push_back(tmp);
  }
  sort(ans.begin(),ans.end());
  for(int i = 0;i < (int)ans.size();i++){
    printf("%d\n",ans[i]);
  }
  return 0;
}
