#include<bits/stdc++.h>
#define ing long long
using namespace std;
const int mod=9901;
int a,b;
int x[300],y[300],tot;
int ans=1;
int pow(int x,int q){
int book=x,a=1;
while(q){
if(q&1){
a*=book;
a%=mod;
}
book*=book;
book%=mod;
q>>=1;
}
return a;
}
signed main(){
cin>>a>>b;
if(b==0){
cout<<1;
return 0;
}
for(int i=2;i*i<=a;i++){
if(a%i==0){
x[++tot]=i;
while(a%i==0){
a/=i;
y[tot]++;
}
y[tot]*=b;
if((x[tot]-1)%mod==0){
ans*=(y[tot]+1)%mod;
}else{
ans*=(pow(x[tot],y[tot]+1)%mod-1+mod)%mod*pow(x[tot]-1,mod-2);
}
ans%=mod;
}
}
if(a!=1){
int i=a;
x[++tot]=i;
y[tot]=b;
if((x[tot]-1)%mod==0){
ans*=(y[tot]+1)%mod;
}else{
ans*=(pow(x[tot],y[tot]+1)-1+mod);
ans%=mod;
ans*=pow(x[tot]-1,mod-2);
}
ans%=mod;
}
cout<<ans;
return 0;
}