#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define first F
#define second S

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int n;
  cin>>n;
  vi v(n);
  rep(i,n) cin>>v[i];
  sort(all(v));
  for(i=1;i<=v[0];i++){
    int c=0;
    rep(j,n)if(v[j]%i==0)c++;
    if(n==c)cout<<i<<endl;
  }
}
#include <cstdio>

int n,a[3];

int gdb(int a,int b){
	if(b == 0){
		return a;
	}
	return gdb(b,a%b);
}

int main(){
	scanf("%d",&n);
	for(int i = 0; i < n; i++){
		scanf("%d",&a[i]);
	}
	int g;
	if(n == 2){
		g = gdb(a[0],a[1]);		
	}
	else{
		g = gdb(gdb(a[0],a[1]),a[2]);
	}
	for(int i = 1; i <= g/2; i++){
		if(g % i == 0){
			printf("%d\n",i);
		}
	}
	printf("%d\n",g);

	return 0;
}

