#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    ll X, k;
    cin >> X >> k;
    const int LIM = 100000;
    if (X == 1) {
        cout << 1 << '\n';
        return 0;
    }
    if (k >= LIM) {
        for (int i = 0; i < LIM; i++)
            cout << 1 << ' ';
        cout << '\n';
        return 0;
    }
    vector<ll> d;
    for (ll p = 1; p * p <= X; p++)
        if (X % p == 0) {
            d.push_back(p);
            if (p * p != X)
                d.push_back(X / p);
        }
    sort(d.begin(), d.end());
    int N = d.size();
    vector<vector<int>> child(N);
    for (int i = 0; i < N; i++)
        for (int j = 0; j <= i; j++)
            if (d[i] % d[j] == 0)
                child[i].push_back(j);
    struct Frame {
        int id, depth, next;
    };
    vector<Frame> st{{N - 1, (int)k, 0}};
    int emitted = 0;
    while (!st.empty() && emitted < LIM) {
        auto &f = st.back();
        if (f.depth == 0 || f.id == 0) {
            cout << d[f.id] << ' ';
            emitted++;
            st.pop_back();
        } else if (f.next == (int)child[f.id].size())
            st.pop_back();
        else {
            int id = child[f.id][f.next++], depth = f.depth - 1;
            st.push_back({id, depth, 0});
        }
    }
    cout << '\n';
}
