import Control.Monad
import qualified Data.IntSet as IntSet
import Data.Maybe
import Debug.Trace
import Data.List
import qualified Data.IntMap.Strict as IntMap

main :: IO ()
main = do
  (n:m:_) <- fmap (map read . words) getLine :: IO [Int]
  print $ solve n m

solve :: Int -> Int -> Int
solve n m = foldr (\x acc -> acc * (countNum x n)) 1 counts
  where
    as = factorization m
    counts = IntSet.foldr (\x acc -> IntMap.insert x (length $ filter (==x) as) acc) IntMap.empty $ IntSet.fromList as

divConst = 10^9 + 7

countNum :: Int -> Int -> Int
countNum a n = factorial (a + n - 1) `div` (factorial (n - 1) * factorial a)

factorial 0 = 1
factorial n = n * factorial (n - 1)

factors :: Int -> [Int]
factors n = [x | x <- [1..n], n `mod` x == 0]

factorization :: Int -> [Int]
factorization 1 = []
factorization x = v : factorization (x `div` v)
  where
    v = (factors x) !! 1
