#include <bits/stdc++.h>
using namespace std;
long long x, k;
vector<long long> ans;
map<long long, vector<long long>> m;
void init(long long val) {
  ans.push_back(1);
  for (long long i = 2; i * i <= val; i++) {
    if (val % i == 0) ans.push_back(i);
    if ((val / i != i) && (val % i == 0) && (val % (val / i) == 0))
      ans.push_back(val / i);
  }
  if (val != 1) ans.push_back(val);
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++)
    for (int j = i; j < ans.size(); j++)
      if (ans[j] % ans[i] == 0) m[ans[j]].push_back(ans[i]);
  ans.clear();
}
void rec(long long x, long long k) {
  if (ans.size() >= 1e5) return;
  if (k == 0) {
    ans.push_back(x);
    return;
  } else if (x == 1) {
    ans.push_back(1);
    return;
  } else {
    for (auto it = m[x].begin(); it != m[x].end(); ++it) {
      rec(*it, k - 1);
      if (ans.size() >= 1e5) return;
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> x >> k;
  if (x == 1) {
    cout << 1;
    return 0;
  }
  init(x);
  rec(x, k);
  for (int i = 0; i <= min((long long)ans.size() - 1, (long long)1e5); i++)
    cout << ans[i] << ' ';
  return 0;
}
