#include <bits/stdc++.h>
using namespace std;
long long gcdExtended(long long a, long long b, long long *x, long long *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long modInverse(long long a, long long m) {
  long long x, y;
  long long g = gcdExtended(a, m, &x, &y);
  long long res = (x % m + m) % m;
  return res;
}
pair<long long, long long> findAns(long long k, long long p2, long long a) {
  map<long long, pair<long long, long long> > m[k + 1];
  map<long long, pair<long long, long long> > sum[k + 1];
  vector<long long> v;
  long long mod = 1000000007;
  long long x = 1;
  for (long long i = (0), _b = (a); i <= _b; i++) {
    v.push_back(x);
    x = x * p2;
  }
  long long n = (long long)pow(p2, a);
  map<long long, long long> m2;
  for (long long i = 0, _n = (v.size()); i < _n; i++) {
    for (long long j = (0), _b = (i); j <= _b; j++) {
      if (v[i] % v[j] == 0) m2[v[i]]++;
    }
  }
  for (long long i = 0, _n = (v.size()); i < _n; i++) {
    for (long long j = 0, _n = (k + 1); j < _n; j++) {
      m[j][v[i]] = make_pair(0, 1);
      sum[j][v[i]] = make_pair(0, 1);
    }
  }
  m[0][n].first = 1;
  sum[0][n].first = 1;
  sum[0][n].second = m2[n];
  for (long long i = (1), _b = (k); i <= _b; i++) {
    m[i][n].first = 1;
    m[i][n].second = ((m[i - 1][n].second % mod) * m2[n] % mod) % mod;
    sum[i][n].first = m[i][n].first;
    sum[i][n].second = (m[i][n].second * (m2[n]) % mod) % mod;
  }
  for (long long k2 = (v.size() - 2), _b = (0); k2 >= _b; k2--) {
    sum[0][v[k2]].first =
        ((((sum[0][v[k2 + 1]].first % mod) * m[0][v[k2]].second % mod) % mod) *
         m2[v[k2]] % mod) %
            mod +
        ((sum[0][v[k2 + 1]].second % mod) * m[0][v[k2]].first % mod) % mod;
    sum[0][v[k2]].second =
        ((((sum[0][v[k2 + 1]].second % mod) * (m[0][v[k2]].second) % mod) %
          mod) *
         (m2[v[k2]]) % mod) %
        mod;
  }
  long long xx = v.size();
  for (long long j = (1), _b = (k); j <= _b; j++) {
    for (long long k2 = (v.size() - 2), _b = (0); k2 >= _b; k2--) {
      m[j][v[k2]].first = sum[j - 1][v[k2]].first;
      m[j][v[k2]].second = sum[j - 1][v[k2]].second;
      sum[j][v[k2]].first =
          ((((sum[j][v[k2 + 1]].first % mod) * m[j][v[k2]].second % mod) %
            mod) *
           m2[v[k2]] % mod) %
              mod +
          ((sum[j][v[k2 + 1]].second % mod) * m[j][v[k2]].first % mod) % mod;
      sum[j][v[k2]].second =
          ((((sum[j][v[k2 + 1]].second % mod) * (m[j][v[k2]].second) % mod) %
            mod) *
           (m2[v[k2]]) % mod) %
          mod;
    }
  }
  long long p, q;
  p = 0;
  q = 1;
  for (long long i = 0, _n = (v.size()); i < _n; i++) {
    p = ((p % mod) * m[k][v[i]].second % mod) % mod +
        ((((q % mod) * (m[k][v[i]].first % mod)) % mod) * (v[i] % mod)) % mod;
    q = ((q % mod) * m[k][v[i]].second % mod) % mod;
  }
  return make_pair(p, q);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long mod = 1000000007;
  long long n;
  cin >> n;
  long long k;
  cin >> k;
  map<long long, long long> x;
  for (long long i = (2), _b = (sqrt(n)); i <= _b; i++) {
    while (n % i == 0) {
      x[i]++;
      n = n / i;
    }
  }
  if (n != 1) x[n]++;
  long long p = 1;
  long long q = 1;
  for (auto it = x.begin(); it != x.end(); it++) {
    pair<long long, long long> pp = findAns(k, it->first, it->second);
    p = (p % mod * (pp.first % mod)) % mod;
    q = (q % mod * (pp.second % mod)) % mod;
  }
  long long mult = modInverse(q, mod) % mod;
  long long ans = (p % mod * (mult % mod)) % mod;
  cout << ans << endl;
}
