#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX1 = 1e4 + 10;
const int MAX2 = 1e3 + 10;
long long int n, x;
int k;
vector<pair<long long int, int> > f;
vector<int> e;
int dp[MAX1][MAX2], sum[MAX1][MAX2];
int mul(int x, int y) { return ((long long int)x * y) % MOD; }
int sub(int x, int y) { return (x - y + MOD) % MOD; }
int add(int x, int y) { return (x + y) % MOD; }
int bp(int x, int y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  if (y & 1) {
    int z = bp(x, (y - 1) / 2);
    return mul(x, mul(z, z));
  }
  int z = bp(x, y / 2);
  return mul(z, z);
}
int mod_div(int x, int y) { return mul(x, bp(y, MOD - 2)); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  x = n;
  for (int i = 2; i <= sqrt(n); i++) {
    int c = 0;
    while (x % i == 0) {
      x /= i;
      c++;
    }
    if (c) {
      f.push_back({i, c});
    }
  }
  if (x > 1) {
    f.push_back({x, 1});
  }
  for (int i = 0; i < f.size(); i++) {
    long long int x = f[i].first;
    x = x % MOD;
    int y = f[i].second;
    dp[0][y] = 1;
    sum[0][y] = mul(dp[0][y], mod_div(1, y + 1));
    for (int j = 1; j <= k; j++) {
      for (int l = 0; l <= y; l++) {
        if (l)
          dp[j][l] = sub(sum[j - 1][y], sum[j - 1][l - 1]);
        else
          dp[j][l] = sum[j - 1][y];
      }
      sum[j][0] = mul(dp[j][0], mod_div(1, 1));
      for (int l = 1; l <= y; l++) {
        sum[j][l] = add(sum[j][l - 1], mul(dp[j][l], mod_div(1, l + 1)));
      }
    }
    long long int exp = 0;
    for (int j = 0; j <= y; j++) {
      exp = add(exp, mul(dp[k][j], bp(x, j)));
    }
    e.push_back(exp);
    for (int j = 0; j <= k; j++) {
      for (int l = 0; l <= y; l++) {
        dp[j][l] = 0;
        sum[j][l] = 0;
      }
    }
  }
  int ans = 1;
  for (int i = 0; i < e.size(); i++) {
    ans = mul(ans, e[i]);
  }
  cout << ans << "\n";
  return 0;
}
