N, M = [int(i) for i in input().split()]



def prime_decomposition(n):

  i = 2

  table = []

  while i * i <= n:

    while n % i == 0:

      n //= i

      table.append(i)

    i += 1

  if n > 1:

    table.append(n)

  return table



def cmb(n, r):

    N, R = n, r

    for i in range(1, r):

        N *= n - i

        R *= r - i

    return N // R



from collections import Counter

A = Counter(prime_decomposition(M))



mod = 10 ** 9 + 7

result = 1

for a in list(A.values()):

    result = result * cmb(a + N - 1, a) % mod



print(result)
N, M = [int(i) for i in input().split()]



def prime_decomposition(n):

  table = []

  i = 2

  while i * i <= n:

    count = 0

    while n % i == 0:

      n //= i

      count += 1

    if count != 0:

        table.append((i, count))

    i += 1

  if n > 1:

    table.append((n, 1))

  return table



def cmb(n, r):

    N, R = n, r

    for i in range(1, r):

        N *= n - i

        R *= r - i

    return N // R



mod = 10 ** 9 + 7

A = prime_decomposition(M)

result = 1

for _, a in A:

    result = result * cmb(a + N - 1, a) % mod



print(result)
N, M = [int(i) for i in input().split()]


def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n //= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table


def cmb(n, r):
    N, R = n, r
    for i in range(1, r):
        N *= n - i
        R *= r - i
    return N // R


from collections import Counter

A = Counter(prime_decomposition(M))
mod = 10**9 + 7
result = 1
for a in list(A.values()):
    result = result * cmb(a + N - 1, a) % mod
print(result)

N, M = [int(i) for i in input().split()]


def prime_decomposition(n):
    table = []
    i = 2
    while i * i <= n:
        count = 0
        while n % i == 0:
            n //= i
            count += 1
        if count != 0:
            table.append((i, count))
        i += 1
    if n > 1:
        table.append((n, 1))
    return table


def cmb(n, r):
    N, R = n, r
    for i in range(1, r):
        N *= n - i
        R *= r - i
    return N // R


mod = 10**9 + 7
A = prime_decomposition(M)
result = 1
for _, a in A:
    result = result * cmb(a + N - 1, a) % mod
print(result)

+    table = [] -    table = [] +        count = 0 -            table.append(i) +            count += 1 +        if count != 0: +            table.append((i, count)) -        table.append(n) +        table.append((n, 1)) -from collections import Counter - -A = Counter(prime_decomposition(M)) +A = prime_decomposition(M) -for a in list(A.values()): +for _, a in A: