#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long gcds[1000][1000];
int main() {
  int n;
  scanf("%d", &n);
  map<long long, long long> m;
  int chislo;
  for (int i = 0; i < n * n; i++) {
    scanf("%d", &chislo);
    m[chislo]++;
  }
  vector<long long> a;
  vector<long long> uniq;
  int left = n;
  long long k, x, num;
  long long P;
  double cor;
  vector<long long> nums;
  map<long long, long long>::iterator it = m.end();
  while (left > 0) {
    it--;
    k = it->first;
    x = it->second;
    P = 0;
    for (int i = 0; i < uniq.size(); i++)
      if (uniq[i] % k == 0) P += 2 * nums[i];
    double R = 0;
    for (int i = 0; i < uniq.size(); i++)
      for (int j = i + 1; j < uniq.size(); j++)
        if (gcds[i][j] == k) R += 2 * nums[i] * nums[j];
    uniq.push_back(k);
    for (int i = 0; i < uniq.size(); i++)
      gcds[i][uniq.size() - 1] = gcds[uniq.size() - 1][i] =
          gcd(uniq[i], uniq[uniq.size() - 1]);
    cor = (((sqrt((double)P * P + 4 * (x - R)) - P) / 2.0) + 0.5);
    num = (long long)cor;
    nums.push_back(num);
    for (int i = 0; i < num; i++) a.push_back(k);
    left -= num;
    if (it == m.begin()) break;
  }
  for (int i = 0; i < a.size(); i++) {
    if (i > 0) printf(" ");
    printf("%I64d", a[i]);
  }
  if (a.size() > 0) printf("\n");
  return 0;
}
