iN,iM = [int(x) for x in input().split()]

iD = 10**9 +7 #法



def fPrimeCounter(iM):

    i = 2

    iS = int(iM ** 0.5) + 1

    aRet = []

    while i < iS or iM != 1:

        iCounter = 0

        while iM % i == 0:

            iM = iM // i

            iCounter += 1

        if 0 < iCounter : aRet.append(iCounter)

        i += 1



    return aRet



#二分累乗法 iDを法として

def fBiPow(iX,iN,iD):

    iY = 1

    while iN > 0:

        if iN % 2 == 0:

            iX = iX * iX % iD

            iN = iN // 2

        else:

            iY = iX * iY % iD

            iN = iN - 1

    return iY



aP = fPrimeCounter(iM)

if aP == [] :

    print((1))

else:

    iMax = max(aP) + iN - 1

    aM = [1] * (iMax + 1)

    #階乗 iD を法とした

    for i in range(1,iMax + 1):

        aM[i] = aM[i-1] * i  % iD

    aInvM = [1]* (iMax + 1)

    aInvM[iMax] = fBiPow(aM[iMax],iD-2,iD)

    #階乗の逆元 iD を法とした

    for i in range(iMax,0,-1):

        aInvM[i-1] = aInvM[i]*i % iD



    iRet = 1

    for i in aP:

        # i + iN -1  C  iN -1

        iRet *= aM[i+iN-1] * aInvM[iN-1] * aInvM[i] % iD

    iRet %= iD

    print(iRet)



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



#二分累乗法 iDを法として

def fBiPow(iX,iN,iD):

    iY = 1

    while iN > 0:

        if iN % 2 == 0:

            iX = iX * iX % iD

            iN = iN // 2

        else:

            iY = iX * iY % iD

            iN = iN - 1

    return iY



aP = fPrimeCounter(iM)

if len(aP) == 0:

    print((1))

    exit()

iMax = max(aP) + iN - 1

aM = [1] * (iMax + 1)

#階乗 iD を法とした

for i in range(1,iMax + 1):

    aM[i] = aM[i-1] * i  % iD

aInvM = [1]* (iMax + 1)

aInvM[iMax] = fBiPow(aM[iMax],iD-2,iD)

#階乗の逆元 iD を法とした

for i in range(iMax,0,-1):

    aInvM[i-1] = aInvM[i]*i % iD



iRet = 1

for i in aP:

    # i + iN -1  C  iN -1

    iRet *= aM[i+iN-1] * aInvM[iN-1] * aInvM[i] % iD

iRet %= iD

print(iRet)

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


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


# 二分累乗法 iDを法として
def fBiPow(iX, iN, iD):
    iY = 1
    while iN > 0:
        if iN % 2 == 0:
            iX = iX * iX % iD
            iN = iN // 2
        else:
            iY = iX * iY % iD
            iN = iN - 1
    return iY


aP = fPrimeCounter(iM)
if aP == []:
    print((1))
else:
    iMax = max(aP) + iN - 1
    aM = [1] * (iMax + 1)
    # 階乗 iD を法とした
    for i in range(1, iMax + 1):
        aM[i] = aM[i - 1] * i % iD
    aInvM = [1] * (iMax + 1)
    aInvM[iMax] = fBiPow(aM[iMax], iD - 2, iD)
    # 階乗の逆元 iD を法とした
    for i in range(iMax, 0, -1):
        aInvM[i - 1] = aInvM[i] * i % iD
    iRet = 1
    for i in aP:
        # i + iN -1  C  iN -1
        iRet *= aM[i + iN - 1] * aInvM[iN - 1] * aInvM[i] % iD
    iRet %= iD
    print(iRet)

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


# 二分累乗法 iDを法として
def fBiPow(iX, iN, iD):
    iY = 1
    while iN > 0:
        if iN % 2 == 0:
            iX = iX * iX % iD
            iN = iN // 2
        else:
            iY = iX * iY % iD
            iN = iN - 1
    return iY


aP = fPrimeCounter(iM)
if len(aP) == 0:
    print((1))
    exit()
iMax = max(aP) + iN - 1
aM = [1] * (iMax + 1)
# 階乗 iD を法とした
for i in range(1, iMax + 1):
    aM[i] = aM[i - 1] * i % iD
aInvM = [1] * (iMax + 1)
aInvM[iMax] = fBiPow(aM[iMax], iD - 2, iD)
# 階乗の逆元 iD を法とした
for i in range(iMax, 0, -1):
    aInvM[i - 1] = aInvM[i] * i % iD
iRet = 1
for i in aP:
    # i + iN -1  C  iN -1
    iRet *= aM[i + iN - 1] * aInvM[iN - 1] * aInvM[i] % iD
iRet %= iD
print(iRet)

-    i = 2 -    while i < iS or iM != 1: +    for i in range(2, iS + 1): -            iM = iM // i +            iM = iM / i -        i += 1 +        if iM == 1: +            break +    if 1 < iM: +        aRet.append(1) -if aP == []: +if len(aP) == 0: -else: -    iMax = max(aP) + iN - 1 -    aM = [1] * (iMax + 1) -    # 階乗 iD を法とした -    for i in range(1, iMax + 1): -        aM[i] = aM[i - 1] * i % iD -    aInvM = [1] * (iMax + 1) -    aInvM[iMax] = fBiPow(aM[iMax], iD - 2, iD) -    # 階乗の逆元 iD を法とした -    for i in range(iMax, 0, -1): -        aInvM[i - 1] = aInvM[i] * i % iD -    iRet = 1 -    for i in aP: -        # i + iN -1  C  iN -1 -        iRet *= aM[i + iN - 1] * aInvM[iN - 1] * aInvM[i] % iD -    iRet %= iD -    print(iRet) +    exit() +iMax = max(aP) + iN - 1 +aM = [1] * (iMax + 1) +# 階乗 iD を法とした +for i in range(1, iMax + 1): +    aM[i] = aM[i - 1] * i % iD +aInvM = [1] * (iMax + 1) +aInvM[iMax] = fBiPow(aM[iMax], iD - 2, iD) +# 階乗の逆元 iD を法とした +for i in range(iMax, 0, -1): +    aInvM[i - 1] = aInvM[i] * i % iD +iRet = 1 +for i in aP: +    # i + iN -1  C  iN -1 +    iRet *= aM[i + iN - 1] * aInvM[iN - 1] * aInvM[i] % iD +iRet %= iD +print(iRet)