#include <bits/stdc++.h>
using namespace std;
const int limit = 1e5;
vector<long long> fac;
void calfac(long long n) {
  fac.clear();
  fac.push_back(1);
  fac.push_back(n);
  long long ost = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i) continue;
    if (i * i < ost) {
      fac.push_back(ost / i);
      fac.push_back(i);
    } else
      fac.push_back(i);
  }
  sort(fac.begin(), fac.end());
}
int cnt;
void dfs(long long n, int k) {
  if (n == 1 || cnt == limit || k == 0) {
    cout << n << " ";
    cnt++;
    return;
  }
  for (int i = 0; i < fac.size() && fac[i] <= n; i++) {
    if (n % fac[i] == 0) dfs(fac[i], k - 1);
    if (cnt == limit) break;
  }
}
int main() {
  long long n, k;
  cin >> n >> k;
  calfac(n);
  dfs(n, k);
}
