#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; using vi = vector; using vvi = vector; using vvvi = vector; using vll = vector; using vvll = vector; using vvvll = vector; using vmi = vector; using vvmi = vector; using vvvmi = vector; #define all(a) (a).begin(), (a).end() #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define drep2(i, m, n) for (int i = (m)-1; i >= (n); --i) #define drep(i, n) drep2(i, n, 0) void solve(){ } using p = pair; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; int w = m; vector

vp; for(int i = 2; i*i <= m; i++){ if(w % i != 0)continue; int c= 0; while(w %i == 0){ c++; w /= i; } vp.push_back({i, c}); if(w == 1)break; } if(w > 1)vp.push_back({w, 1}); mint ans = mint(1); for(auto q : vp){ ans *= mint(q.second+1).pow(n) - mint(q.second).pow(n); }cout << ans.val() << endl; return 0; }