#include #if __has_include() #include using namespace atcoder; #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair; using mint = modint1000000007; vector

factorize(ll n) { vector

res; for (ll i = 2; i*i <= n; ++i) { if (n%i != 0) continue; res.emplace_back(i, 0); while (n%i == 0) { n /= i; res.back().second++; } } if (n != 1) res.emplace_back(n, 1); return res; } int main() { int n; ll m; cin >> n >> m; auto fs = factorize(m); mint ans = 1; for (auto [p, e] : fs) { vector dp(n, vector(e+1)); rep(i, e+1) dp[0][i] = 1; rep(i, n-1) { mint sum; for (int k = e; k >= 0; --k) { sum += dp[i][e-k]; dp[i+1][k] = sum; } } mint now; rep(i, e+1) now += dp[n-1][i]; ans *= now; } cout << ans.val() << '\n'; return 0; }