#include<iostream> #include<set> #include<algorithm> #include<vector> #include<string> #include<set> #include<map> #include<numeric> #include<queue> #include<cmath> using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair<ll,ll> P; typedef pair<int,P> PP; const ll MOD=1e9+7; vector<P> primediv(ll n){ vector<P> res; for(ll p=2;p*p<=n;p++){ if(n%p==0){ P tmp=make_pair(p,0); while(n%p==0){ tmp.second++; n/=p; } res.push_back(tmp); } } if(n>1){ res.emplace_back(n,1); n/=n; } return res; } int main(){ int N; ll M; cin>>N>>M; auto divM=primediv(M); ll ans=1; for(auto [v,num]:divM){ vector<vector<ll>> dp(N+1,vector<ll>(num+1,0)); for(int j=0;j<=num;j++){ dp[0][j]=1; } for(int i=1;i<N;i++){ for(int j=0;j<=num;j++){ for(int l=0;l<=num-j;l++){ dp[i][j]+=dp[i-1][l]; dp[i][j]%=MOD; } } } ll sum=0; for(int j=0;j<=num;j++){ sum+=dp[N-1][j]; sum%=MOD; } ans*=sum; ans%=MOD; } cout<<ans<<endl; }