#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #include<map> #include<set> #include<queue> #include<stack> #include<cctype> usingnamespace std; constlonglong mod = 9901; vector<pair<longlong, longlong> > p; longlongksm(longlong x, longlong n) { longlong ret = 1; for (; n; n >>= 1) { if (n & 1) ret = ret * x % mod; x = x * x % mod; } return ret % mod; } longlongcount(longlong x, longlong n) { if (!x) return0; if (!n) return1; if (n & 1) returncount(x, n >> 1) * (ksm(x, (n >> 1) + 1) + 1) % mod; returnksm(x, n >> 1) + count(x, (n >> 1) - 1) * (ksm(x, (n >> 1) + 1) + 1) % mod; } intmain() { longlong a, b, i, j, sum, res = 0; scanf("%lld%lld", &a, &b); for (i = 2; i * i <= a; i++)//试除法 { if (a % i == 0) { sum = 0; while (a % i == 0) { sum++; a /= i; } if (sum) p.push_back(make_pair(i, sum)); } } if (a > 1) p.push_back(make_pair(a, 1));//“记录下来” for (i = 0; i < p.size(); i++) { if (!res) res = 1; res *= count(p[i].first, p[i].second * b); res %= mod; } printf("%lld\n", res); return0; }