#include <bits/stdc++.h>
using namespace std;
const long long magic_const = 1e18;
const long long mod = 1000 * 1000 * 1000 + 7;
class dsu {
 private:
  vector<int> v;
  vector<int> sizes;

 public:
  dsu(int n) : v(n), sizes(n, 1) {
    for (int i = 0; i < n; i++) v[i] = i;
  }
  int get(int x) { return v[x] == x ? x : (v[x] = get(v[x])); }
  void unite(int l, int r) {
    int tmpl = get(l), tmpr = get(r);
    if (sizes[tmpl] <= sizes[tmpr]) swap(tmpl, tmpr);
    v[tmpr] = tmpl;
    sizes[tmpl] += sizes[tmpr];
  }
};
map<long long, int> primes;
void get_primes(long long n) {
  long long tmpn = n;
  for (long long i = 2; i * i <= tmpn; i++) {
    while (n % i == 0) {
      primes[i]++;
      n /= i;
    }
  }
  if (n > 1) primes[n]++;
}
long long bin_pow(long long x, long long p) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    auto tmp = bin_pow(x, p / 2);
    return (tmp * tmp) % mod;
  } else {
    return (x * bin_pow(x, p - 1)) % mod;
  }
}
vector<vector<long long>> p;
vector<vector<long long>> q;
vector<long long> num;
pair<long long, long long> get_answer(deque<int> &d) {
  if (d.size() == p.size()) {
    long long p1 = 1;
    long long q1 = 1;
    long long numt = 1;
    for (int i = 0; i < d.size(); i++) {
      int j = d[i];
      p1 *= p[i][j];
      p1 %= mod;
      q1 *= q[i][j];
      q1 %= mod;
      for (int tmp = 0; tmp < d[i]; tmp++) {
        numt *= num[i];
        numt %= mod;
      }
    }
    p1 *= numt;
    p1 %= mod;
    return {p1, q1};
  }
  {
    int i = d.size();
    long long p1 = 0;
    long long q1 = 1;
    for (int j = 0; j < p[i].size(); j++) {
      d.push_back(j);
      auto pt = get_answer(d);
      d.pop_back();
      p1 *= pt.second;
      p1 %= mod;
      p1 += (pt.first * q1) % mod;
      p1 %= mod;
      q1 *= pt.second;
      q1 %= mod;
    }
    return {p1, q1};
  }
}
void solve() {
  long long n, k;
  cin >> n >> k;
  get_primes(n);
  for (auto &it : primes) {
    num.push_back(it.first);
    p.push_back(vector<long long>(it.second + 1, 0));
    q.push_back(vector<long long>(it.second + 1, 1));
    p[p.size() - 1][it.second] = 1;
  }
  for (int iteration = 0; iteration < k; iteration++) {
    for (int i = 0; i < num.size(); i++) {
      long long psum = 0;
      long long qsum = 1;
      for (int j = p[i].size() - 1; j >= 0; j--) {
        long long tmp_p = p[i][j];
        long long tmp_q = (q[i][j] * (j + 1)) % mod;
        p[i][j] = ((tmp_p * qsum) % mod + (psum * tmp_q) % mod) % mod;
        q[i][j] = (tmp_q * qsum) % mod;
        psum *= tmp_q;
        psum %= mod;
        psum += (tmp_p * qsum) % mod;
        psum %= mod;
        qsum *= tmp_q;
        qsum %= mod;
      }
    }
  }
  deque<int> d;
  auto tmp_a = get_answer(d);
  auto ans = (tmp_a.first * bin_pow(tmp_a.second, mod - 2)) % mod;
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
