#include using namespace std; using ll = long long; using P = pair; #define fix(x) fixed << setprecision(x) #define asc(x) x, vector, greater #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a _PN; vector _B; int n; PrimeNumber(int _n=0){ init(_n); } void init(int _n){ n = _n; _B.assign(n+1,true); _B[1] = false; for(int i=2;i<=n;i++){ if(_B[i]){ _PN.push_back(i); for(int j=2*i;j<=n;j+=i) _B[j] = false; } } } bool isprime_big(ll x){ ll m = n; assert(x<=m*m); for(int &y:_PN){ if(y*y>x) break; if(!(x%y)) return false; } return true; } bool isprime(ll x){ assert(0 pnlist(){ return _PN; }; }; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); PrimeNumber P(320); auto pn = P.pnlist(); ll n,k; cin >> n >> k; ll t2 = 0, t3 = 0; vector p; for(int d:pn){ if(n==1) break; while(!(n%d)){ if(d==2) t2++; else if(d==3) t3++; else p.push_back(d); n /= d; } } if(n>1) p.push_back(n); while(k){ if(!p.size()) break; k--; t3 = t3 * 2 % (MOD-1); swap(t2,t3); vector upd; for(int x:p){ x++; for(int d:pn){ if(x==1) break; while(!(x%d)){ if(d==2) t2++; else if(d==3) t3++; else upd.push_back(d); x /= d; } } if(x>1) upd.push_back(x); } p = upd; } t2 = t2 * mpow(2,k/2,MOD-1) % (MOD-1); t3 = t3 * mpow(2,k/2,MOD-1) % (MOD-1); if(k&1){ t3 = t3 * 2 % (MOD-1); swap(t2,t3); } ll ans = mpow(2,t2)*mpow(3,t3)%MOD; for(int x:p) ans = ans * (x) % MOD; cout << ans << '\n'; return 0; }