// #define _GLIBCXX_DEBUG #include using namespace std; #include using namespace atcoder; using ll = long long; #define rep(i,n) for (ll i = 0; i < (n); ++i) using vl = vector; using vvl = vector; using P = pair; #define pb push_back #define int long long #define double long double #define INF (ll) 3e18 // Ctrl + Shift + B コンパイル // Ctrl + C 中断 // ./m 実行 // 行列累乗のライブラリ // https://atcoder.jp/contests/abc204/submissions/23280760 template struct Matrix { int h, w; vector> d; Matrix() {} Matrix(int h, int w, T val=0): h(h), w(w), d(h, vector(w,val)) {} Matrix& unit() { assert(h == w); rep(i,h) d[i][i] = 1; return *this; } const vector& operator[](int i) const { return d[i];} vector& operator[](int i) { return d[i];} Matrix operator*(const Matrix& a) const { assert(w == a.h); Matrix r(h, a.w); rep(i,h)rep(k,w)rep(j,a.w) { r[i][j] += d[i][k]*a[k][j]; } return r; } Matrix pow(ll t) const { assert(h == w); if (!t) return Matrix(h,h).unit(); if (t == 1) return *this; Matrix r = pow(t>>1); r = r*r; if (t&1) r = r*(*this); return r; } }; signed main(){ using mint = modint1000000007; int n, k; cin >> n >> k; vvl soinsu(100010); // 素因数分解 for(int i = 2; i <= 100000; i++){ int now = i; for(auto x : soinsu[i]) now /= x; if (now != 1){ for(int j = i; j <= 100000; j += i) soinsu[j].push_back(now); } } vvl soinsu_inv(100010); rep(i,100000){ for(auto x : soinsu[i]) soinsu_inv[x].push_back(i-1); } vector ans(100010); for(int i = 2; i <= 100010; i++){ while(n % i == 0) { ans[i]++; n /= i; } } rep(i, min(k, 10LL)){ vector next(100010); rep(j, 100010){ for(auto x : soinsu_inv[j]){ next[j] += ans[x]; } } ans = next; if (k & (1LL << i)){ } } k -= min(k, 10LL); if (k == 0) { mint res = 1; rep(i,100010){ if (ans[i].val()) res *= (mint(i)).pow(ans[i].val()); } cout << res.val() << endl; } else { Matrix d(110,110); rep(i,110){ for(auto x : soinsu[i]) d[x][i-1]++; } Matrix x(110,1); rep(i,110) x[i][0] = ans[i]; x = d.pow(k) * x; mint res = 1; rep(i,110){ if (x[i][0].val()) res *= (mint(i)).pow(x[i][0].val()); } cout << res.val() << endl; } }