#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; map prime_factor(ll x){ map res; for(ll i=2;i*i<=x;i++){ while(x%i==0){ res[i]++; x/=i; } } if(x!=1) res[x]++; return res; } const int MOD=998244353; ll modpow(ll x,ll n){ x%=MOD; ll ans=1; while(n){ if(n&1) ans=ans*x%MOD; x=x*x%MOD; n/=2; } return ans; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); ll n,m; cin>>n>>m; map ma=prime_factor(m); ll ans=1; for(auto [a,b]:ma){ ans=ans*(modpow(b+1,n)-modpow(b,n)+MOD)%MOD; } cout<