#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;

int main() {
  int N; cin >>N;
  if(N == 2){
    int a, b; cin >>a >>b;
    FOR(i, 1, max(a, b) + 1) if(a % i == 0 && b % i == 0) cout <<i <<endl;
  } else{
    int a, b, c; cin >>a >>b >>c;
    FOR(i, 1, max(a, max(b, c)) + 1) if(a % i == 0 && b % i == 0 && c % i == 0) cout <<i <<endl;
  }
  return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define sz(obj) ((int)(obj).size())
#define pf push_front
#define pb push_back

int main()
{
  int n;
  cin >> n;
  int a[3] = {0};
  REP(i, n) cin >> a[i];
  if (n == 2){
    FOR(i, 1, min(a[0], a[1]) + 1){
      if (a[0] % i == 0 && a[1] % i == 0) cout << i << endl;
    }
  }
  else {
    FOR(i, 1, min(min(a[0], a[1]), a[2]) + 1){
      if (a[0] % i == 0 && a[1] % i == 0 && a[2] % i == 0) cout << i << endl;
    }
  }
}