#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmax(T& x, T y) {
  return x < y ? x = y, 1 : 0;
}
template <typename T>
inline bool chkmin(T& x, T y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
inline void read(T& x) {
  char c;
  int sign = 1;
  x = 0;
  do {
    c = getchar();
    if (c == '-') sign = -1;
  } while (!isdigit(c));
  do {
    x = x * 10 + c - '0';
    c = getchar();
  } while (isdigit(c));
  x *= sign;
}
const int mod = 1e9 + 7;
inline int ksm(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % mod;
    x = 1ll * x * x % mod;
    y >>= 1;
  }
  return res;
}
long long n, m, ans = 1;
int p, cnt, f[105][10005], inv[110];
vector<long long> pr, ct;
int main() {
  inv[1] = 1;
  inv[0] = 1;
  for (register int i = 2; i <= 109; ++i)
    inv[i] = 1ll * inv[mod % i] * (mod - mod / i) % mod;
  read(n);
  read(p);
  m = n;
  for (int i = 2; 1ll * i * i <= n; ++i) {
    if (n % i == 0) {
      pr.push_back(i);
      ct.push_back(0);
      while (n % i == 0) n /= i, ++ct.back();
    }
  }
  if (n > 1) pr.push_back(n % mod), ct.push_back(1);
  int sz = pr.size();
  --sz;
  for (register int i = 0; i <= sz; ++i) {
    memset(f, 0, sizeof f);
    f[ct[i]][p] = 1;
    for (register int j = ct[i]; j >= 0; --j)
      for (register int k = p; k >= 1; --k)
        for (register int l = j; l >= 0; --l)
          f[l][k - 1] = (f[l][k - 1] + 1ll * inv[j + 1] * f[j][k] % mod) % mod;
    int res = 0;
    for (register int j = 0; j <= ct[i]; ++j)
      res = (res + 1ll * f[j][0] * ksm(pr[i], j)) % mod;
    ans = 1ll * ans * res % mod;
  }
  cout << ans << endl;
  return 0;
}
