#include <bits/stdc++.h>
using namespace std;
const int maxk = 1e4 + 10, lg = 50 + 2, inf = 1e9 + 10, M = 1e9 + 7;
int k, dp[lg][lg][maxk], sum[lg][lg][maxk], rev[lg + 1];
int psize, tee[lg];
long long n, p[lg];
void taj(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        tee[psize]++;
        n /= i;
      }
      p[psize++] = i;
    }
  }
  if (n > 1) {
    tee[psize] = 1;
    p[psize++] = n;
  }
}
int eh(long long x) {
  int ans = 1;
  for (int i = 0; i < psize; i++) {
    int cnt = tee[i];
    while (x % p[i] == 0) {
      cnt--;
      x /= p[i];
    }
    ans = (1ll * ans * dp[tee[i]][cnt][k]) % M;
  }
  return ans;
}
int power(int a, int b) {
  int ans = 1;
  while (b > 0) {
    if (b & 1) {
      ans = 1ll * ans * a % M;
    }
    a = 1ll * a * a % M;
    b >>= 1;
  }
  return ans;
}
int32_t main() {
  cin >> n >> k;
  for (int i = 1; i < lg + 1; i++) {
    rev[i] = power(i, M - 2);
  }
  for (int o = 0; o < lg; o++) {
    for (int i = 0; i < k + 1; i++) {
      dp[o][o][0] = 1;
      sum[0][0][i] = 1;
    }
  }
  for (int i = 1; i < lg; i++) {
    for (int o = 0; o < i + 1; o++) {
      sum[i][o][0] = 1;
      for (int j = 1; j < k + 1; j++) {
        dp[i][o][j] = 1ll * sum[i][o][j - 1] * rev[i + 1] % M;
        sum[i][o][j] = (sum[i - 1][o][j] + dp[i][o][j]) % M;
      }
    }
  }
  taj(n);
  int sm = 0;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      int e = eh(n / i);
      long long a = i % M;
      sm = (sm + 1ll * e * a % M) % M;
      if (n / i != i) {
        e = eh(i);
        long long a = n / i;
        a %= M;
        sm = (sm + 1ll * e * a % M) % M;
      }
    }
  }
  cout << sm << endl;
}
