mod = 10**9 + 7



def factorize(n):

    # http://nihaoshijie.hatenadiary.jp/entry/2018/02/03/115759

    fct = []

    b, e = 2, 0

    while b * b <= n:

        while n % b == 0:

            n = n // b

            e = e + 1

        if e > 0:

            fct.append(e)

        b, e = b + 1, 0

    if n > 1:

        fct.append(1)

    return fct



class COMB_MOD():

    # http://drken1215.hatenablog.com/entry/2018/06/08/210000

    def __init__(self, max_n=510000, mod=10**9+7):

        self.fac = [0]*max_n

        self.finv = [0]*max_n

        self.inv = [0]*max_n

        self.fac[0] = self.fac[1] = 1

        self.finv[0] = self.finv[1] = 1

        self.inv[1] = 1

        self.max = max_n

        self.mod = mod

        self._maesyori()



    def _maesyori(self):

        for i in range(2,self.max):

            self.fac[i] = self.fac[i-1] * i % self.mod

            self.inv[i] = self.mod - self.inv[self.mod % i] * (self.mod // i) % self.mod

            self.finv[i] = self.finv[i-1] * self.inv[i] % self.mod



    def COM(self, n, k):

        if n < k : return 0

        if n < 0 or k < 0:return 0

        return self.fac[n] * (self.finv[k] * self.finv[n-k] % self.mod) % self.mod



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

fct = factorize(m)

ans = 1

COM = COMB_MOD()

for cnt in fct:

    ans = ans*COM.COM(cnt+n-1, cnt) % mod

print(ans)
from collections import Counter

mod = 10**9 + 7

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



def fact(m):

    c = Counter()

    s = 2

    while s**2 <= m:

        if m % s:

            s += 1

            continue

        while m % s == 0:

            c[s] += 1

            m //= s

    if m > 1:

        c[m] += 1

    return c



def comb(n, r):

    ret = 1

    for i in range(min(r, n-r)):

        ret = ret*(n-i)//(i+1)

    return ret



ans = 1

for cnt in list(fact(m).values()):

    ans = ans*comb(cnt+n-1, cnt) % mod

#    for i in range(cnt):

#        ans = ans*(cnt+n-1-i)//(i+1)

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


def factorize(n):
    # http://nihaoshijie.hatenadiary.jp/entry/2018/02/03/115759
    fct = []
    b, e = 2, 0
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append(e)
        b, e = b + 1, 0
    if n > 1:
        fct.append(1)
    return fct


class COMB_MOD:
    # http://drken1215.hatenablog.com/entry/2018/06/08/210000
    def __init__(self, max_n=510000, mod=10**9 + 7):
        self.fac = [0] * max_n
        self.finv = [0] * max_n
        self.inv = [0] * max_n
        self.fac[0] = self.fac[1] = 1
        self.finv[0] = self.finv[1] = 1
        self.inv[1] = 1
        self.max = max_n
        self.mod = mod
        self._maesyori()

    def _maesyori(self):
        for i in range(2, self.max):
            self.fac[i] = self.fac[i - 1] * i % self.mod
            self.inv[i] = self.mod - self.inv[self.mod % i] * (self.mod // i) % self.mod
            self.finv[i] = self.finv[i - 1] * self.inv[i] % self.mod

    def COM(self, n, k):
        if n < k:
            return 0
        if n < 0 or k < 0:
            return 0
        return self.fac[n] * (self.finv[k] * self.finv[n - k] % self.mod) % self.mod


n, m = list(map(int, input().split()))
fct = factorize(m)
ans = 1
COM = COMB_MOD()
for cnt in fct:
    ans = ans * COM.COM(cnt + n - 1, cnt) % mod
print(ans)

from collections import Counter

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


def fact(m):
    c = Counter()
    s = 2
    while s**2 <= m:
        if m % s:
            s += 1
            continue
        while m % s == 0:
            c[s] += 1
            m //= s
    if m > 1:
        c[m] += 1
    return c


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


ans = 1
for cnt in list(fact(m).values()):
    ans = ans * comb(cnt + n - 1, cnt) % mod
#    for i in range(cnt):
#        ans = ans*(cnt+n-1-i)//(i+1)
print((ans % mod))

+from collections import Counter + +n, m = list(map(int, input().split())) -def factorize(n): -    # http://nihaoshijie.hatenadiary.jp/entry/2018/02/03/115759 -    fct = [] -    b, e = 2, 0 -    while b * b <= n: -        while n % b == 0: -            n = n // b -            e = e + 1 -        if e > 0: -            fct.append(e) -        b, e = b + 1, 0 -    if n > 1: -        fct.append(1) -    return fct +def fact(m): +    c = Counter() +    s = 2 +    while s**2 <= m: +        if m % s: +            s += 1 +            continue +        while m % s == 0: +            c[s] += 1 +            m //= s +    if m > 1: +        c[m] += 1 +    return c -class COMB_MOD: -    # http://drken1215.hatenablog.com/entry/2018/06/08/210000 -    def __init__(self, max_n=510000, mod=10**9 + 7): -        self.fac = [0] * max_n -        self.finv = [0] * max_n -        self.inv = [0] * max_n -        self.fac[0] = self.fac[1] = 1 -        self.finv[0] = self.finv[1] = 1 -        self.inv[1] = 1 -        self.max = max_n -        self.mod = mod -        self._maesyori() - -    def _maesyori(self): -        for i in range(2, self.max): -            self.fac[i] = self.fac[i - 1] * i % self.mod -            self.inv[i] = self.mod - self.inv[self.mod % i] * (self.mod // i) % self.mod -            self.finv[i] = self.finv[i - 1] * self.inv[i] % self.mod - -    def COM(self, n, k): -        if n < k: -            return 0 -        if n < 0 or k < 0: -            return 0 -        return self.fac[n] * (self.finv[k] * self.finv[n - k] % self.mod) % self.mod +def comb(n, r): +    ret = 1 +    for i in range(min(r, n - r)): +        ret = ret * (n - i) // (i + 1) +    return ret -n, m = list(map(int, input().split())) -fct = factorize(m) -COM = COMB_MOD() -for cnt in fct: -    ans = ans * COM.COM(cnt + n - 1, cnt) % mod -print(ans) +for cnt in list(fact(m).values()): +    ans = ans * comb(cnt + n - 1, cnt) % mod +#    for i in range(cnt): +#        ans = ans*(cnt+n-1-i)//(i+1) +print((ans % mod))