require "prime" N, M = gets.split.map(&:to_i) MOD = 10**9 + 7 pd = M.prime_division ans = 1 pd.each do |_, e| dp = [1] * 60 (N - 1).times do dp2 = [0] * 60 (0 ... 60).each do |a| (a .. e).each do |b| dp2[b] += dp[a] end end (0 ... 60).each do |i| dp[i] = dp2[i] % MOD end end ans *= dp.sum ans %= MOD end puts ans