求 x^n 的因子和
typedef long long LL ;
const int maxn = 11000 ;
const int mod = 9901 ;
bool is[maxn + 10] ;
vector<int> prime ;
int n ;
void make(){
prime.clear() ;
memset(is , 0 , sizeof(is)) ;
for(int i = 2 ; i <= maxn ; i++){
if(!is[i]) prime.push_back(i) ;
for(int j = 0 ; j < prime.size() && prime[j]*i <= maxn ; j++){
is[i*prime[j]] = 1 ;
if(i % prime[j] == 0) break ;
}
}
}
map<LL ,LL> h ;
void fac(int x){
int i ; LL t ;
h.clear() ;
for(i = 0 ; prime[i]*prime[i] <= x ; i++){
if(x % prime[i] == 0){
t = 0 ;
while(x % prime[i] == 0){
x /= prime[i] ;
t++ ;
}
h[(LL)prime[i]] = t*n ;
}
}
if(x != 1) h[(LL)x] = n ;
}
LL Pow(LL x , LL y){
LL s = 1 ;
for(; y ; y >>= 1){
if(y&1){
s *= x ;
s %= mod ;
}
x *= x ;
x %= mod ;
}
return s ;
}
LL sum(LL x , LL t){ // 等比数列 1 + x + x^2 + ...+ x^t
if(t == 0) return 1 ;
if(t&1)
return sum(x , t>>1) * (1 + Pow(x , (t>>1) +1)) % mod ;
else
return (sum(x , (t>>1)-1) * (1 + Pow(x , (t>>1) + 1)) % mod) + Pow(x , t>>1) ;
}
LL answer(){
map<LL ,LL>::iterator it ;
LL ans = 1 ;
for(it = h.begin() ; it != h.end() ; it++){
ans *= sum(it->first , it->second) ;
ans %= mod ;
}
return ans ;
}
int main(){
make() ;
int x ;
while(scanf("%d%d" ,&x , &n) != EOF){
if(n == 0) {puts("1") ; continue ;}
if(x == 0){puts("0") ; continue ;}
h.clear() ;
fac(x) ;
cout<< answer() << endl ;
}
return 0 ;
}