#include <bits/stdc++.h>
using namespace std;
queue<long long> q;
map<long long, vector<long long> > m;
int cnt;
bool solve = true;
void factor(long long ele, long long turn) {
  if (ele == 1) {
    cout << 1 << " ";
    cnt++;
    if (cnt == 100000) {
      solve = false;
    }
    return;
  }
  if (m[ele].size() == 0) {
    int i;
    vector<long long> v;
    for (i = 1; i <= sqrt(ele); i++) {
      if (i != sqrt(ele) && ele % i == 0) {
        v.push_back(i);
        v.push_back(ele / i);
      } else if (ele % i == 0) {
        v.push_back(i);
      }
    }
    sort(v.begin(), v.end());
    m[ele] = v;
  }
  if (turn == 1) {
    int i;
    for (i = 0; i < m[ele].size(); i++) {
      cout << m[ele][i] << " ";
      cnt++;
      if (cnt == 100000) {
        solve = false;
        return;
      }
    }
  } else {
    int i;
    for (i = 0; i < m[ele].size(); i++) {
      factor(m[ele][i], turn - 1);
      if (!solve) {
        return;
      }
    }
  }
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  int i, j, sz;
  long long n, k, ele;
  cin >> n >> k;
  if (n == 1 || k == 0) {
    cout << n;
    return 0;
  }
  factor(n, k);
}
