#include<bits/stdc++.h>
using namespace std;
int gcd(int a,int b){
    int c;
    while((c=a%b)!=0){
        a=b;
        b=c;
    }
    return b;
}
vector<int> divisor(int n){
    vector<int> div;
    for(int i=1;i<=n;i++){
        if(n%i==0){
            div.push_back(n/i);
        }
    }
    sort(div.begin(),div.end());
    return div;
}
int main(void){
    int n,A[3],gcdA;
    vector<int> div;
    cin>>n;
    if(n==2){
        cin>>A[0]>>A[1];
        gcdA=gcd(A[0],A[1]);
        vector<int> div=divisor(gcdA);
        for(int i=0;i<div.size();i++){
            cout<<div[i]<<endl;
        }
    }else{
        cin>>A[0]>>A[1]>>A[2];
        gcdA=gcd(A[0],gcd(A[1],A[2]));
        vector<int> div=divisor(gcdA);
        for(int i=0;i<div.size();i++){
            cout<<div[i]<<endl;
        }
    }
    return 0;
}

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i = a;i < n;i++)
typedef unsigned long long ull;
typedef long long ll;
using namespace std;

int main(){
    int n,memo;
    priority_queue<int,vector<int>,greater<int> > que;
    cin >> n;
    int a[n];
    
    rep(i,0,n){
        cin >> a[i];
    }
    
    sort(a,a+n);
    
    rep(i,1,sqrt(a[n-1])+1){
        rep(j,0,n){
            if(a[j] % i)break;
            else if(j == n-1)que.push(i);
        }
        
        if(a[n-1]/i == i)continue;
        
        rep(j,0,n){
            if(a[j] % (a[n-1]/i))break;
            else if(j == n-1)que.push(a[n-1]/i);
        }
    }
    
    while(!que.empty()){
        if(que.top() == memo){
            que.pop();
            continue;
        }
        memo = que.top(); que.pop();
        
        cout << memo << endl;
    }
}
