import sys input = lambda: sys.stdin.readline().rstrip() mod = 1000000007 from collections import Counter def factorization(n: int) -> Counter: ret = Counter() tmp = n for i in range(2, int(-(-n**0.5//1))+1): if tmp == 1: break if tmp % i == 0: cnt = 0 while tmp % i == 0: cnt += 1 tmp //= i ret[i] = cnt if tmp != 1: ret[tmp] = 1 if ret == []: ret[n] = 1 return ret # ----------------------- # n, m = map(int, input().split()) ans = 1 for p,e in factorization(m).items(): dp = [[0]*(e+1) for _ in range(n+1)] for i in range(e+1): dp[0][i] = 1 for i in range(n): acc = [0] * (e+2) for j in range(e+1): acc[j+1] += acc[j] + dp[i][j] for j in range(e+1): dp[i+1][j] += acc[e-j+1] dp[i+1][j] %= mod ans *= dp[-1][0] ans %= mod print(ans)