CodeEff/ECCO huggingface dataset:
# Original solution
from math import factorial

iN,iM = [int(x) for x in input().split()]
iD = 10**9 +7 #法

def fPrimeCounter(iM):
    iS = int(iM ** 0.5) + 1
    aRet = []
    for i in range(2,iS + 1):
        iCounter = 0
        while iM % i == 0:
            iM = iM / i
            iCounter += 1
        if 0 < iCounter : aRet.append(iCounter)
        if iM == 1 : break
    if 1 < iM  : aRet.append(1)
    return aRet

aP = fPrimeCounter(iM)
iRet = 1
for i in aP:
    iRet *= (factorial(i+iN-1)  // (factorial(iN-1) * factorial(i)) )% iD
iRet %= iD
print(iRet)



# Optimized solution

iN,iM = [int(x) for x in input().split()]
iD = 10**9 +7 #法

def fPrimeCounter(iM):
    iS = int(iM ** 0.5) + 1
    aRet = []
    for i in range(2,iS + 1):
        iCounter = 0
        while iM % i == 0:
            iM /= i
            iCounter += 1
        if 0 < iCounter : aRet.append(iCounter)
        if iM == 1 : break
    if 1 < iM  : aRet.append(1)
    return aRet
def fnCr(iN,iR,iD):
    iR = min(iR,iN-iR)
    if iR == 0 :
        return 1
    elif iR == 1 :
        return iN
    return (iN % iD) * pow(iR,iD-2,iD) * fnCr(iN-1,iR-1,iD) % iD

aP = fPrimeCounter(iM)
#if aP == []:
#   print(1)
#   exit()
iRet = 1
for i in aP:
    # i + iN -1  C  iN -1
    iRet *= fnCr(i+iN-1,i,iD)
iRet %= iD
print(iRet)
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n, m = list(map(int, input().split()))

MOD = 10 ** 9 + 7
factorial = [0] * (10 ** 6 + 1)
inverse = [0] * (10 ** 6 + 1)
factorial[0] = inverse[0] = 1
for i in range(1, 10 ** 6 + 1):
    factorial[i] = (factorial[i-1] * i) % MOD
    inverse[i] = pow(factorial[i], MOD-2, MOD)

prime_factors = []
total = 0
i = 2
while i ** 2 <= m:
    ext = 0
    while m % i == 0:
        ext += 1
        m //= i
    if ext:
        prime_factors.append((i, ext))
        total += ext
    i += 1
if m != 1:
    prime_factors.append((m, 1))
    total += 1

ans = 1
for pf, num in prime_factors:
    ans = (ans * (factorial[num + (n-1)] * inverse[num] * inverse[n-1])) % MOD
print(ans)


# Optimized solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n, m = list(map(int, input().split()))

MOD = 10 ** 9 + 7
prime_factors = []
i = 2
while i ** 2 <= m:
    ext = 0
    while m % i == 0:
        ext += 1
        m //= i
    if ext:
        prime_factors.append((i, ext))
    i += 1
if m != 1:
    prime_factors.append((m, 1))

ans = 1
for pf, num in prime_factors:
    denominator = 1
    numerator = 1
    for i in range(num):
        denominator *= (i+1)
        numerator *= (num + (n-1)) - i
    ans = (ans * (numerator // denominator)) % MOD
print(ans)
# Original solution
import math

def combination(n,k):
    return (math.factorial(n)//math.factorial(k))//math.factorial(n-k)

R = 10**9 + 7

(N, M) = list(map(int,input().split()))

decomposition = []
i = 2
while i * i <= M:
    if M % i == 0:
        decomposition.append(0)
        while M % i ==0:
            decomposition[-1] = decomposition[-1] + 1
            M = M//i
    i = i + 1
if M > 1:
    decomposition.append(1)

H = [ combination(N+k-1,k) % R for k in decomposition]
r = 1
for h in H:
    r = (r*h) % R

print(r)

# Optimized solution
import math

R = 10**9 + 7

def combination(n,k):
    if 2*k > n:
        k = n - k

    r = 1
    for i in range(n-k+1,n+1):
        r = (r*i)

    r = (r//math.factorial(k))

    return r

(N, M) = list(map(int,input().split()))

decomposition = []
i = 2
while i * i <= M:
    if M % i == 0:
        decomposition.append(0)
        while M % i ==0:
            decomposition[-1] = decomposition[-1] + 1
            M = M//i
    i = i + 1
if M > 1:
    decomposition.append(1)

H = [ combination(N+k-1,k) % R for k in decomposition]
r = 1
for h in H:
    r = (r*h) % R

print(r)
# Original solution
inpl = lambda: list(map(int,input().split()))
MOD = 10**9 + 7
N, M = inpl()
 
def factorize(n):
  prime_list = []
  factorize_list = []
  i = 2
  while i*i <= n:
    for p in prime_list:
      if i % p == 0:
        break
    else:
      prime_list.append(i)
      k = 0
      while n % i == 0:
        n //= i
        k += 1
      factorize_list.append(k)
    i += 1
  if n > 1:
    factorize_list.append(1)
  return(factorize_list)

def H(n,k):
  h = 1
  L = n + k - 1
  k = min(n-1,k)
  for j in range(k):
    h *= L-j
  for j in range(k):
    h //= j+1
  return h

ans = 1
for k in factorize(M):
  ans *= H(N,k) % MOD
  ans %= MOD

print(ans)

# Optimized solution
inpl = lambda: list(map(int,input().split()))
MOD = 10**9 + 7
N, M = inpl()
 
def factorize(n):
  factorize_list = []
  i = 2
  while i*i <= n:
    k = 0
    while n % i == 0:
      n //= i
      k += 1
    if k > 0:
      factorize_list.append(k)
    i += 1
  if n > 1:
    factorize_list.append(1)
  return(factorize_list)

def H(n,k):
  h = 1
  L = n + k - 1
  k = min(n-1,k)
  for j in range(k):
    h *= L-j
  for j in range(k):
    h //= j+1
  return h

ans = 1
for k in factorize(M):
  ans *= H(N,k) % MOD
  ans %= MOD

print(ans)
# Original solution
import math

def isprime(n):
    if(n<2):
        return False
    for i in range(2,int(n**0.5)+1):
        if(n%i==0):
            return False
    return True

def primelist(n):
    return [i for i in range(n) if isprime(i)]

def factor(n):
    f = {}
    for p in primelist(int(n**0.5)+1):
        while(n % p == 0):
            f[p] = f.get(p, 0) + 1
            n //= p
    if(n != 1):
        f[n] = 1
    return f

# mの各素因数を振り分ける
# 各素因数p(^a)について，nつに振り分ける
# (n+a)! / (n!a!)
n,m=list(map(int, input().split()))
f = factor(m)
ans = 1
for k,v in list(f.items()):
    ans *= (math.factorial(n-1+v)//(math.factorial(n-1)*math.factorial(v)))
    ans %= (int(1e9+7))

print(ans)


# Optimized solution
import math

def factorize(n):
    ret={}
    i = 2
    while n >= i**2:
        cnt = 0
        while n % i == 0:
            n //= i
            cnt += 1
        if cnt != 0:
            ret[i] = cnt
        i += 1
    if n != 1:
        ret[n] = 1
    return ret

def combination(n,r):
    ret = 1
    r = min(r, n-r)
    for i in range(n-r+1, n+1):
        ret *= i
    for i in range(1, r+1):
        ret //= i
    return ret


# mの各素因数を振り分ける
# 各素因数p(^a)について，nつに振り分ける
# n-1+a C n-1 
n,m=list(map(int, input().split()))
f = factorize(m)
ans = 1
for k,v in list(f.items()):
    ans *= combination(n-1+v, v)
    ans %= (int(1e9+7))
print(ans)
# Original solution
# 2 6=>4 (1,6)*2,(2,3)*2
# 3 12=>18 (1,1,12)*3,(1,2,6)*6,(1,3,4)*6,(2,2,3)*3
import math
def comb(a,b): # aCb
    return math.factorial(a)//math.factorial(a-b)//math.factorial(b)

n,m=list(map(int,input().split()))
divisor={}
tmp=m
# for i in range(2,m+1):
i=2
while i*i<=m:
    while tmp%i==0:
        tmp//=i
        divisor.setdefault(i,0)
        divisor[i]+=1
    # if tmp==1:
    #     break
    i+=1
if tmp>1:
    divisor[tmp]=1
# print(divisor)
cnt=1
for key in divisor:
    c=divisor[key]
    cnt*=comb(c+n-1,c)
print((cnt%1000000007))


# Optimized solution
# うまく効率化できなかった
# 2 6=>4 (1,6)*2,(2,3)*2
# 3 12=>18 (1,1,12)*3,(1,2,6)*6,(1,3,4)*6,(2,2,3)*3
# import math
# def comb(a,b):
#     return math.factorial(a)//math.factorial(a-b)//math.factorial(b)
def comb(a,b): # aCb
    b=min(b,a-b)
    result=1
    for i in range(a,a-b,-1):
        result*=i
    for i in range(1,b+1):
        result//=i
    return result

n,m=list(map(int,input().split()))
divisor={}
tmp=m
# for i in range(2,m+1):
#     while tmp%i==0:
#         tmp//=i
#         divisor.setdefault(i,0)
#         divisor[i]+=1
#         if tmp==1:
#             break
i=2
while i*i<=m:
    while tmp%i==0:
        tmp//=i
        divisor.setdefault(i,0)
        divisor[i]+=1
    i+=1
if tmp>1:
    divisor[tmp]=1
# print(divisor)
cnt=1
for key in divisor:
    c=divisor[key]
    cnt*=comb(c+n-1,c)
print((cnt%1000000007))
# Original solution
def com(n,m):
    if(n-m < m):
        m=n-m
    result=1
    mylist=[i for i in range(1,m+1)]
    j=1
    for i in range(1,m+1):
        result*=(n+1-i)
        if(j<m):
            while(result%mylist[j]==0):
                result//=mylist[j]
                j+=1
                if(j>=m):
                    break
    return result

def yakusuu(i,m):
    _i=i
    while(i*2<=m):
        if(m%i==0):
            return i
        else:
            i+=1
    for j in range(_i-1,0,-1):
        if(m%j==0):
            break
    return m//j
    

N,M=list(map(int,input().split()))
soinsuubunkai={}
tmp=2
i=2
_M=M
while(tmp <=M):
    tmp=yakusuu(tmp,M)

    if(tmp in soinsuubunkai):
        soinsuubunkai[tmp]+=1
    else:
        soinsuubunkai[tmp]=1
    M//=tmp
    if(M==1):
        break


tmp=1
for k in list(soinsuubunkai.values()):
    tmp*=com(k+N-1,k)
    tmp%=10**9+7
print(tmp)

# Optimized solution
def com(n,m):
    if(n-m < m):
        m=n-m
    result=1
    mylist=[i for i in range(1,m+1)]
    j=1
    for i in range(1,m+1):
        result*=(n+1-i)
        if(j<m):
            while(result%mylist[j]==0):
                result//=mylist[j]
                j+=1
                if(j>=m):
                    break
    return result

def yakusuu(i,m):
    _i=i
    while(i**2<=m):
        if(m%i==0):
            return i
        else:
            i+=1
    for j in range(_i-1,0,-1):
        if(m%j==0):
            break
    return m//j
    

N,M=list(map(int,input().split()))
soinsuubunkai={}
tmp=2
i=2
_M=M
while(tmp <=M):
    tmp=yakusuu(tmp,M)

    if(tmp in soinsuubunkai):
        soinsuubunkai[tmp]+=1
    else:
        soinsuubunkai[tmp]=1
    M//=tmp
    if(M==1):
        break


tmp=1
for k in list(soinsuubunkai.values()):
    tmp*=com(k+N-1,k)
    tmp%=10**9+7
print(tmp)
# Original solution
from itertools import groupby
from math import factorial


def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors


def comb(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))


N, M = list(map(int, input().split()))
result = 1

for k, g in groupby(prime_factors(M)):
    result = result * comb(len(list(g)) + N - 1, N - 1)
    result = result % (10 ** 9 + 7)

print(result)


# Optimized solution
import operator as op
from itertools import groupby
from functools import reduce

NN = 10 ** 9 + 7


def prime_factors(n):
    i = 2
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            yield i
    if n > 1:
        yield n


def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, list(range(n, n-r, -1)), 1)
    denom = reduce(op.mul, list(range(1, r+1)), 1)
    return numer // denom


N, M = list(map(int, input().split()))
result = 1

for k, g in groupby(prime_factors(M)):
    result = result * ncr(len(list(g)) + N - 1, N - 1)
    if result > NN:
        result = result % NN

print(result)
# Original solution
import math
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass
N,M = list(map(int,input().split()))
L = prime_factor(M)
L.append(0)
K = []
cur = L[0]
cnt = 0
for i in range(len(L)):
  if cur == L[i]:
    cnt += 1
  else:
    K.append(cnt)
    cnt = 1
    cur = L[i]
ans = 1
for i in range(len(K)):
  n = K[i]+N-1
  k = N-1
  a = (math.factorial(n))%(10**9+7)
  b = (math.factorial(k)%(10**9+7))
  c = (math.factorial(n-k)%(10**9+7))
  ans *= (a*pow(b*c,10**9+5,10**9+7))%(10**9+7)
print((ans%(10**9+7)))

# Optimized solution
import math
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass
N,M = list(map(int,input().split()))
L = prime_factor(M)
L.append(0)
K = []
cur = L[0]
cnt = 0
for i in range(len(L)):
  if cur == L[i]:
    cnt += 1
  else:
    K.append(cnt)
    cnt = 1
    cur = L[i]
ans = 1
for i in range(len(K)):
  n = K[i]+N-1
  k = N-1
  cur = 1
  for i in range(k+1,n+1):
    cur *= i
  for j in range(1,n-k+1):
    cur = cur//j
  ans *= cur%(10**9+7)
print((ans%(10**9+7)))
# Original solution
"""
---アルゴリズム概要---
a1 ~ anの各スロットに、Mの各素因数をいくつ置くか、という問題。
まずは、Mを素因数分解し、それから重複組み合わせの容量で、各素因数ごとに配分パターンを算出。
それらの配分パターンを素因数間でかけ合わせると、答えとなる。

Mの素因数分解は、試し割り法という最もシンプルな方法で行う。
"""
from collections import Counter
import math
N,M = list(map(int,input().split()))
factors = []
while True:
    if M % 2 == 0:
        M //= 2
        factors.append(2)
    else:
        break
f = 3
while f**2 <= M:
    if M % f == 0:
        M //= f
        factors.append(f)
    else:
        f += 2
if M != 1:
    factors.append(M)

counter = Counter(factors)
ans = 1
for r in list(counter.values()):
    ans *= math.factorial(N+r-1)//(math.factorial(N-1)*math.factorial(r))

print((ans%(10**9+7)))

# Optimized solution
"""
---アルゴリズム概要---
Mを構成する素因数を、a1~aNの各スロットにいくつ置くのか、を考える問題。
まずは試し割りによってMを素因数分解。
重複組合せの公式で各素因数の配置パターンを算出し累乗していく。

試し割りは、O(√M)の計算量で処理できる。
√Mを超える素因数は、多くても一つしか存在しないため、√Mを超える値で試し割りをする必要はない。
もし√Mまでの値で試し割りを終えた段階で、Mを素因数分解しきれていなければ、残った商こそが√Mを超える唯一の素因数である。

簡単に証明
もし√Mを超える素因数が２つ存在しているとしよう。
それらは、(√M + α)と(√M + β)というふうに表すことができる。
この２つの積は明らかにMの値を超えてしまう。つまり前提に矛盾する。
したがって、√Mを超える素因数は多くても一つ
"""
from collections import Counter
import math

N,M = list(map(int,input().split()))
factors = []

while M%2 == 0:
    M//=2
    factors.append(2)
    
f = 3
while f**2 <= M:
    while M%f==0:
        M//=f
        factors.append(f)
    f+=2
if M!=1:
    factors.append(M)

factors = Counter(factors)

ans = 1
for k in list(factors.values()):
    ans *= math.factorial(k+N-1)//(math.factorial(N-1)*math.factorial(k))

print((ans%(10**9+7)))
# Original solution
import math
N, M = list(map(int, input().split(' ')))
MOD = int(1e9 + 7)
primes = []
if M % 2 == 0:
  primes.append(2)
def is_prime(n):
  for i in range(len(primes)):
    if n % primes[i] == 0:
      return False
  return True
for i in range(3, int(1e5)):
  if is_prime(i):
    primes.append(i)

seeds = []
for p in primes:
  while M % p == 0:
    seeds.append(p)
    M = M // p

def comb(n, k):
  ans = 1
  for i in range(1, k + 1):
    ans = (ans * (n + 1 - i) // i)
  return ans

ans = comb(len(seeds)-1, N-1)
# !!! 24=(2^a1 * 3^b1) * (2^a2 * 3^b2) * ... | sum(a) = 3, sub(b) = 1, len(a) = 4
# aのパターン数は 3,0,0,0 = ooo|||, 2,1,0,0 = oo|o|| なので並び替えのパターン数で
# (sum(a) + 分ける数)! / (sum(a)! * 分ける数!) = (6!/(3!3!)) = 20
# b にも同じことをして 1,0,0,0 = o||| = (1+3)!/(1!*3!) = 4
# 24を4つに分けるパターンは 20 * 4 = 80?

# (a+b)!/(a!b!) = (a+b)Ca = (a+b)Cb

ans = 1
hogehoge = set(seeds)
for i in hogehoge:
  a_ct = seeds.count(i)
  ans = (ans * comb(a_ct + N-1, min(a_ct, N-1))) % MOD
print(ans)


# Optimized solution
N, M = list(map(int, input().split(' ')))
MOD = int(1e9 + 7)
primes = []
if M % 2 == 0:
  primes.append(2)

seeds = []
p = 2
while M > 1:
  while M % p == 0:
    seeds.append(p)
    M = M // p
  if p*p > M:
    if M != 1:
	    seeds.append(M)
    M = 0
  p += 1

def comb(n, k):
  ans = 1
  for i in range(1, k + 1):
    ans = (ans * (n + 1 - i) // i)
  return ans

ans = 1
hogehoge = set(seeds)
for i in hogehoge:
  a_ct = seeds.count(i)
  ans = (ans * comb(a_ct + N-1, min(a_ct, N-1))) % MOD
print(ans)
# Original solution
from itertools import groupby

N, M = list(map(int, input().split()))
mod = 10 ** 9 + 7


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


def make_table(n, mod=10 ** 9 + 7):
    N = n
    # 元テーブル
    g1 = [0] * (N + 1)
    g1[0] = 1
    g1[1] = 1

    # 逆元テーブル
    g2 = [0] * (N + 1)
    g2[0] = 1
    g2[1] = 1

    # 逆元テーブル計算用テーブル
    inverse = [0] * (N + 1)
    inverse[0] = 0
    inverse[1] = 1

    for i in range(2, N + 1):
        g1[i] = (g1[i - 1] * i) % mod
        inverse[i] = (-inverse[mod % i] * (mod // i)) % mod
        g2[i] = (g2[i - 1] * inverse[i]) % mod

    return g1, g2


def main():
    def cmb(n, r, mod):
        if r < 0 or r > n:
            return 0
        r = min(r, n - r)
        return g1[n] * g2[r] * g2[n - r] % mod

    p = [len(list(j)) for i, j in groupby(prime_factorize(M))]
    g1, g2 = make_table(10 ** 6, mod)
    answer = 1
    for i in p:
        answer *= cmb(i + N - 1, N - 1, mod)
        answer %= mod

    print(answer)


if __name__ == '__main__':
    main()


# Optimized solution
from itertools import groupby
from operator import mul
from functools import reduce

N, M = list(map(int, input().split()))
mod = 10 ** 9 + 7


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


def cmb(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, list(range(n, n - r, -1)))
    under = reduce(mul, list(range(1, r + 1)))
    return over // under


def main():
    p = [len(list(j)) for i, j in groupby(prime_factorize(M))]
    answer = 1
    for i in p:
        answer *= cmb(i + N - 1, N - 1)
        answer %= mod

    print(answer)


if __name__ == '__main__':
    main()
# Original solution
import collections
import math
n,m=list(map(int,input().split()))
flag=0
P=[]
p=m
while flag==0:
  cur=p
  for i in range(2,int(p**0.5)+1):
    if p%i==0:
      P.append(i)
      p//=i
      break
  if p==cur:
    P.append(p)
    flag=1
c=collections.Counter(P)
Primes=set(P)
def f(i):
  return math.factorial(i)
def fn(i):
  return f(n+i-1)//(f(n-1)*f(i))%(10**9+7)
ans=1
for p in Primes:
  ans*=fn(c[p])
  ans%=(10**9+7)
print((1 if m==1 else ans)) 


# Optimized solution
import sys
input=lambda: sys.stdin.readline().rstrip()
mod=10**9+7
n,m=list(map(int,input().split()))
n_max=2*(10**5+1)
F,FI=[0]*(n_max+1),[0]*(n_max+1)
F[0],FI[0]=1,1
for i in range(n_max):
  F[i+1]=(F[i]*(i+1))%mod
FI[n_max-1]=pow(F[n_max-1],mod-2,mod)
for i in reversed(list(range(n_max-1))):
  FI[i]=(FI[i+1]*(i+1))%mod
def comb(x,y):
  return (F[x]*FI[x-y]*FI[y])%mod

pf={}
for i in range(2,int(m**0.5)+1):
  while m%i==0:
    pf[i]=pf.get(i,0)+1
    m//=i
if m>1:
  pf[m]=1

ans=1
for k in list(pf.keys()):
  ans=(ans*comb(n-1+pf[k],pf[k]))%mod
print(ans)
# Original solution
import math
def factoring(n,dict_count = {}):
    sup = math.floor(pow(n,1/2))
    n_new = n
    for i in range(2,sup + 1):
        if n % i == 0:
            n_new = n // i
            if i in dict_count:
                dict_count[i] += 1
            else:
                dict_count[i] = 1
            break
    if n == n_new:
        if n_new in dict_count:
            dict_count[n_new] += 1
        else:
            dict_count[n_new] = 1
        return sorted(list(dict_count.items()))
    return factoring(n_new,dict_count)

# 組み合わせ　n_C_r
import math
def comb(n,r):
    return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))

N,M = list(map(int,input().split()))
if M == 1:
    print((1))
    exit()
ans = 1
for a,b in factoring(M):
    ans *= comb(b+N-1,b)
    ans %= 10**9 + 7
print(ans)

# Optimized solution
# 素因数分解 ソート済みリスト (素因数,指数)
import math
def factoring(n,dict_count = {}):
    sup = math.floor(pow(n,1/2))
    n_new = n
    for i in range(2,sup + 1):
        if n % i == 0:
            n_new = n // i
            if i in dict_count:
                dict_count[i] += 1
            else:
                dict_count[i] = 1
            break
    if n == n_new:
        if n_new in dict_count:
            dict_count[n_new] += 1
        else:
            dict_count[n_new] = 1
        return sorted(list(dict_count.items()))
    return factoring(n_new,dict_count)

def comb(n,r):
    r = min(r,n-r)
    result = 1
    for i in range(n-r+1,n+1):
        result *= i
    for i in range(1,r+1):
        result //= i
    return result

N,M = list(map(int,input().split()))
if M == 1:
    print((1))
    exit()
ans = 1
for a,b in factoring(M):
    ans *= comb(b+N-1,b)
    ans %= 10**9 + 7
print(ans)
# Original solution
from collections import defaultdict
n,m=list(map(int,input().split()))
mod=10**9+7
kaidan=[1]*(2*10**5+1)
gyaku=[1]*(2*10**5+1)

for i in range(1, 2*10**5):
    kaidan[i]=i*kaidan[i-1] % mod
    gyaku[i]=pow(kaidan[i],mod-2,mod)
def comb(a,b):
    if a>0 and b>0 and a-b>0:
        return (kaidan[a] * gyaku[b]*gyaku[a-b])%mod
    elif a==0 or b==0 or a-b==0:
        return 1
    else:
        return 0

soin=defaultdict(int)
while m>=2:
    for i in range(2,int(n**.5)+5):
        while m%i==0 and m!=0:
            m//=i
            soin[i]+=1
            if m==1:
                break
                
L=list(soin.values())
ans=1
for l in L:
    ans*=comb(l+n-1,l)
    ans%=mod
print(ans)

# Optimized solution
from collections import defaultdict
n,m=list(map(int,input().split()))
mod=10**9+7
kaidan=[1]*(2*10**5+1)
gyaku=[1]*(2*10**5+1)

for i in range(1, 2*10**5):
    kaidan[i]=i*kaidan[i-1] % mod
    gyaku[i]=pow(kaidan[i],mod-2,mod)
def comb(a,b):
    if a>0 and b>0 and a-b>0:
        return (kaidan[a] * gyaku[b]*gyaku[a-b])%mod
    elif a==0 or b==0 or a-b==0:
        return 1
    else:
        return 0
def fctr1(n): 
    f=[]
    c=0
    r=int(n**0.5)
    for i in range(2,r+2):
        while n%i==0:
            c+=1
            n=n//i
        if c!=0:
            f.append([i,c])
            c=0
    if n!=1:
        f.append([n,1])
    return f
# soin=defaultdict(int)
# while m>=2:
#     for i in range(2,int(n**.5)+5):
#         while m%i==0 and m!=0:
#             m//=i
#             soin[i]+=1
#             if m==1:
#                 break
     
L=list(fctr1(m))
ans=1
for a,l in L:
    ans*=comb(l+n-1,l)
    ans%=mod
print(ans)
# Original solution
import sys
N = int(eval(input()))
N = list(map(int,input().split()))
C= 1
if N==0:
    print((0))
    sys.exit()
for i in N:
  C = C*i
  if C > (10 ** 18):
    C=-1
print(C)

# Optimized solution
def mul2():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    
    if 0 in a:
        return 0
    ans = 1
    for i in a:
        ans *= i
        if ans > 1000000000000000000:
            return -1
        
    return ans 
print((mul2()))
# Original solution
# ABC169 B Multiplication 2

from collections import deque

n = int(eval(input()))

a_list = deque([int(x) for x in input().split()])

ans = 1
for i in range(n):
    ans *= a_list.popleft()

if ans > 10**18:
    print("-1")
else:
    print(ans)

# Optimized solution
# ABC169 B Multiplication 2

from collections import deque

n = int(eval(input()))

a_list = [int(x) for x in input().split()]

if min(a_list) == 0:
    print("0")
else:
    a_dq = deque(a_list)
    ans = 1
    for i in range(n):
        ans *= a_dq.popleft()
        if ans > 10**18:
            break

    if ans > 10**18:
        print("-1")
    else:
        print(ans)
# Original solution
import sys
sys.setrecursionlimit(10000000)
input=sys.stdin.readline

n = int(eval(input()))
l = list(map(int,input().split()))

a=10**18
ans=1
for i in l:
    ans*=i

if ans > a:print((-1));exit()
print(ans)

# Optimized solution
import sys
sys.setrecursionlimit(10000000)
input=sys.stdin.readline
 
n = int(eval(input()))
l = list(map(int,input().split()))

if 0 in l:print((0));exit()

a=10**18
ans=1
for i in l:
    ans*=i
    if ans > a:print((-1));exit()

print(ans)
# Original solution
N = int(eval(input()))

A=[int(i) for i in input().split()]

answer=1
for i in range(N):
  answer = answer*A[i]

if answer>10**18:
  print((-1))
else:
  print(answer)

# Optimized solution
N = int(eval(input()))

A=[int(i) for i in input().split()]

answer=1
if 0 in A:
  print((0))
else:
  for i in range(N):
    answer = answer*A[i]
    if answer>10**18:
      print((-1))
      break
  else:
    print(answer)
# Original solution
N = int(eval(input()))
A = list(map(int, input().split()))
x = 1
for i in A:
    x *= i
if x > 10**18:
    print((-1))
else:
    print(x)

# Optimized solution
N = int(eval(input()))
A = list(map(int, input().split()))
x = 1
if 0 in A:
    print((0))
else:
    for i in A:
        x *= i
        if x > 10**18:
            break
    if x > 10**18:
        print((-1))
    else:
        print(x)