#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
using namespace std;


int main()
{
    int n, ans = 1;
    cin >> n;
    vector<int> v(n);
    set<int> cand;
    for (int i = 0; i < n; i++) cin >> v[i];
    for (int i = 2; i < v[0]; i++){
        int t = v[0];
        while (!(t%i)){
            cand.insert(i);
            t /= i;
        }
    }
    for (auto itr = cand.begin(); itr != cand.end(); itr++){
        int d = *itr;
        for (int j = 1; j < v.size(); j++){
            if ((v[j]%d)) break;
            if (j == v.size() -1) ans = d;
        }
    }
    string delim = "";
    for (auto x : v){
        cout << delim << x/ans;
        delim = ":";
    }
    cout << endl;
}