import math



def factorize(n):

    d = {}

    temp = int(math.sqrt(n))+1

    for i in range(2, temp):

        while n%i== 0:

            n //= i

            if i in d:

                d[i] += 1

            else:

                d[i] = 1

    if d == {}:

        d[n] = 1

    else:

        if n in d:

            d[n] += 1

        elif n != 1:

            d[n] =1

    return d



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



if m == 1:

    print((1))

    exit()



def cmb1(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



mod = 10**9+7

N = 2*10**5+5

g1 = [1, 1]

g2 = [1, 1]

inverse = [0, 1]



for i in range( 2, N + 1 ):

    g1.append( ( g1[-1] * i ) % mod )

    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )

    g2.append( (g2[-1] * inverse[-1]) % mod )



d = factorize(m)

ans = 1

for v in list(d.values()):

    ans *= cmb1(v+n-1, v, mod)

    ans %= mod

print((ans%mod))

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



if m == 1:

    print((1))

    exit()



mod = 10**9+7



import math

def factorize(n):

    d = {}

    temp = int(math.sqrt(n))+1

    for i in range(2, temp):

        while n%i== 0:

            n //= i

            if i in d:

                d[i] += 1

            else:

                d[i] = 1

    if d == {}:

        d[n] = 1

    else:

        if n in d:

            d[n] += 1

        elif n != 1:

            d[n] =1

    return d



mod = 10**9+7

N = 10**6

fac = [1]*(N+1)

finv = [1]*(N+1)

for i in range(N):

    fac[i+1] = fac[i] * (i+1) % mod

finv[-1] = pow(fac[-1], mod-2, mod)



for i in reversed(list(range(N))):

    finv[i] = finv[i+1] * (i+1) % mod



def cmb1(n, r, mod):

    if r <0 or r > n:

        return 0

    r = min(r, n-r)

    return fac[n] * finv[r] * finv[n-r] % mod



d = factorize(m)

ans = 1

for k, v in list(d.items()):

    ans *= cmb1(v+n-1, n-1, mod)

    ans %= mod

print(ans)

import math


def factorize(n):
    d = {}
    temp = int(math.sqrt(n)) + 1
    for i in range(2, temp):
        while n % i == 0:
            n //= i
            if i in d:
                d[i] += 1
            else:
                d[i] = 1
    if d == {}:
        d[n] = 1
    else:
        if n in d:
            d[n] += 1
        elif n != 1:
            d[n] = 1
    return d


n, m = list(map(int, input().split()))
if m == 1:
    print((1))
    exit()


def cmb1(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


mod = 10**9 + 7
N = 2 * 10**5 + 5
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, N + 1):
    g1.append((g1[-1] * i) % mod)
    inverse.append((-inverse[mod % i] * (mod // i)) % mod)
    g2.append((g2[-1] * inverse[-1]) % mod)
d = factorize(m)
ans = 1
for v in list(d.values()):
    ans *= cmb1(v + n - 1, v, mod)
    ans %= mod
print((ans % mod))

n, m = list(map(int, input().split()))
if m == 1:
    print((1))
    exit()
mod = 10**9 + 7
import math


def factorize(n):
    d = {}
    temp = int(math.sqrt(n)) + 1
    for i in range(2, temp):
        while n % i == 0:
            n //= i
            if i in d:
                d[i] += 1
            else:
                d[i] = 1
    if d == {}:
        d[n] = 1
    else:
        if n in d:
            d[n] += 1
        elif n != 1:
            d[n] = 1
    return d


mod = 10**9 + 7
N = 10**6
fac = [1] * (N + 1)
finv = [1] * (N + 1)
for i in range(N):
    fac[i + 1] = fac[i] * (i + 1) % mod
finv[-1] = pow(fac[-1], mod - 2, mod)
for i in reversed(list(range(N))):
    finv[i] = finv[i + 1] * (i + 1) % mod


def cmb1(n, r, mod):
    if r < 0 or r > n:
        return 0
    r = min(r, n - r)
    return fac[n] * finv[r] * finv[n - r] % mod


d = factorize(m)
ans = 1
for k, v in list(d.items()):
    ans *= cmb1(v + n - 1, n - 1, mod)
    ans %= mod
print(ans)

+n, m = list(map(int, input().split())) +if m == 1: +    print((1)) +    exit() +mod = 10**9 + 7 -n, m = list(map(int, input().split())) -if m == 1: -    print((1)) -    exit() +mod = 10**9 + 7 +N = 10**6 +fac = [1] * (N + 1) +finv = [1] * (N + 1) +for i in range(N): +    fac[i + 1] = fac[i] * (i + 1) % mod +finv[-1] = pow(fac[-1], mod - 2, mod) +for i in reversed(list(range(N))): +    finv[i] = finv[i + 1] * (i + 1) % mod -    return g1[n] * g2[r] * g2[n - r] % mod +    return fac[n] * finv[r] * finv[n - r] % mod -mod = 10**9 + 7 -N = 2 * 10**5 + 5 -g1 = [1, 1] -g2 = [1, 1] -inverse = [0, 1] -for i in range(2, N + 1): -    g1.append((g1[-1] * i) % mod) -    inverse.append((-inverse[mod % i] * (mod // i)) % mod) -    g2.append((g2[-1] * inverse[-1]) % mod) -for v in list(d.values()): -    ans *= cmb1(v + n - 1, v, mod) +for k, v in list(d.items()): +    ans *= cmb1(v + n - 1, n - 1, mod) -print((ans % mod)) +print(ans)