#include #include #include #include using namespace std; using namespace atcoder; using ll=long long; using mint=modint998244353; #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll N,M; cin>>N>>M; mint ans=1; for(ll x=2;x*x<=M;x++){ int e=0; while(M>0&&M%x==0){ M/=x; e++; } if(e>0){ ans*=mint(e+1).pow(N)-mint(e).pow(N); } } if(M>1){ ans*=mint(2).pow(N)-1; } cout<