#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())

const int MAX = 510000;
const int MOD = 1000000007;

ll gcd(ll a, ll b) {
  if(b == 0) return a;
  return gcd(b, a % b);
}


// 約数の列挙
vector<ll> divisor(ll n) {
    vector<ll> res;
    for (ll i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            res.push_back(i);
            if (i != n / i) {
                res.push_back(n / i);
            }
        }
    }
    return res;
}


int main(){
  ll N;cin>>N;
  ll a,b;cin>>a>>b;
  ll c;
  if(N==2){
    c = gcd(a,b);
  }
  else{
    c = gcd(a, gcd(b,c));
  }

  vector<ll> v = divisor(c);
  sort(v.begin(),v.end());
  rep(i,v.size()){
    cout<<v[i]<<endl;
  }

}


#include <iostream>
#include <cstdio>
#include <string.h>
#include <algorithm>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a,b,c = 100000001;
  if(n == 2)cin >> a >> b;
  if(n == 3)cin >> a >> b >> c;
  int mn = min(a,min(b,c));
  if(n == 2)c = 0;
  for(int i = 1 ; i <= mn ; i++ ){
    if(a%i == 0 && b%i == 0 && c%i == 0)cout << i << endl;
  }
  return 0;
}