alias LL = Int64 macro chmin(x, y); {{x}} = {{y}} if {{x}} > {{y}}; end macro chmax(x, y); {{x}} = {{y}} if {{x}} < {{y}}; end macro yn(x); {{x}} ? "Yes" : "No"; end # 素因数分解 def factorization(n : Int64) res = [] of Array(Int64) i = 2i64 while i * i <= n if n % i == 0 cnt = 0i64 while n % i == 0 n //= i cnt += 1 end res << [i, cnt] end i += 1 end res << [n, 1i64] if n != 1 return res end # ---------------------------------------------------- :) n, m = read_line.split.map(&.to_i64) mod = 10**9+7 pr = factorization(m) ans = 1i64 pr.size.times do |i| e = pr[i][-1] dp = Array.new(n+1){Array.new(e+1, 0i64)} 0.upto(e) do |i| dp[0][i] = 1 end 0.upto(n-1) do |j| s = 0i64 e.downto(0) do |k| s += dp[j][e-k] s %= mod dp[j+1][k] = s end end ans = (ans * dp[n-1].sum(&.% mod)) % mod end puts ans