#include <bits/stdc++.h>
using namespace std;
long long int X, k, ans = 0;
long long int a[100000], b[100000], ai, bi;
void dfs(long long int x, long long int step) {
  if (step >= k || x == 1) {
    ans++;
    if (ans == 1)
      printf("%lld", x);
    else
      printf(" %lld", x);
    return;
  }
  for (int i = 1; i <= ai; i++) {
    if (x % a[i] == 0) {
      dfs(a[i], step + 1);
      if (ans >= 100000) return;
    }
    if (a[i] > x) break;
  }
  for (int i = bi; i >= 1; i--) {
    if (x % b[i] == 0) {
      dfs(b[i], step + 1);
      if (ans >= 100000) return;
    }
    if (b[i] > x) break;
  }
}
int main() {
  ai = bi = 0;
  scanf("%lld %lld", &X, &k);
  k = min((long long int)100002, k);
  for (int i = 1; i <= sqrt(X); i++) {
    if (X % i == 0) {
      a[++ai] = i;
      if (X / i != i) b[++bi] = X / i;
    }
  }
  dfs(X, 0);
  printf("\n");
  return 0;
}
