#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n;
    cin >> n;

    auto gcd = [](int mm, int nn) {
        function<int(int, int)> f = [&f](int m, int n) {
            if (n == 0) {
                return m;
            }
            else {
                return f(n, m % n);
            }
        };
        return f(max(mm, nn), min(mm, nn));
    };
    auto gcd3 = [gcd](int n, int m, int o) { return gcd(n, gcd(m, o)); };
    vector<int> r;
    if (n == 2) {
        int a, b;
        cin >> a >> b;
        const auto s = gcd(a, b);
        for (int i = 1; i <= s; ++i) {
            if (a % i == 0 && b % i == 0) {
                r.push_back(i);
            }
        }
    }
    else {
        int a, b, c;
        cin >> a >> b >> c;
        const auto s = gcd3(a, b, c);
        for (int i = 1; i <= s; ++i) {
            if (a % i == 0 && b % i == 0 && c % i == 0) {
                r.push_back(i);
            }
        }
    }
    for (auto i : r) {
        cout << i << endl;
    }
}

#include<stdio.h>
int main(void)
{
	int n;
	int a[3],b,c;
	int i,j,temp;
	b=1;
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	if(n==2){
		if(a[0]<a[1]){
			temp=a[0];
			a[0]=a[1];
			a[1]=temp;
		}
		while(b!=a[1]){
			for(i=0;i<a[1];i++){
				if(a[0]%b==0 && a[1]%b==0){
					printf("%d\n",b);
				}
			b++;
			}
		break;
		}
	}
	else if(n==3){
		for(i=0;i<2;i++){
			for(j=i+1;j<3;j++){
				if(a[i]<a[j]){
					temp=a[i];
					a[i]=a[j];
					a[j]=temp;
				}
			}
		}
		while(b!=a[2]){
			for(i=0;i<a[2];i++){
				if(a[0]%b==0 && a[1]%b==0 && a[2]%b==0){
						printf("%d\n",b);
				}
			b++;
			}
		break;
		}
	}
	return 0;
}