#include using namespace std; #define MOD 1000000007 vector> fact(long long N) { vector > res; for (long long a = 2; a * a <= N; ++a) { if (N % a != 0) continue; long long ex = 0; while (N % a == 0) { ++ex; N /= a; } res.push_back({ a, ex }); } if (N != 1) res.push_back({ N, 1 }); return res; } int main() { long long N, M; cin >> N >> M; auto factor = fact(M); long long N_ = factor.size(); long long ans = 1; for (int q = 0; q < N_; q++) { vector> dp(N + 1, vector(factor[q].second + 1, 0)); dp[0][0] = 1; for (int i = 1; i <= N; i++) { for (int j = factor[q].second; j >= 0; j--) { for (int k = 0; k <= j; k++) { dp[i][j] = (dp[i][j] + dp[i - 1][k]) % MOD; } } } long long sum = 0; for (int i = 0; i <= factor[q].second; i++) { sum = (sum + dp[N][i]) % MOD; } ans = ans * sum % MOD; } cout << ans << endl; }