import           Data.List
import qualified Data.Map as M

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

solve :: Integer -> Integer -> Integer
solve n = (`mod` (10 ^ 9 + 7))
    . M.foldl' (*) 1
    . M.map (\b -> comb (b + n - 1) b)
    . factorization

factorization :: Integer -> M.Map Integer Integer
factorization 1 = M.empty
factorization n = M.insertWith (+) p 1 $ factorization (n `div` p)
    where p = head $ filter (\k -> n `mod` k == 0) [2 ..]

comb :: Integer -> Integer -> Integer
comb n k = (foldl' (*) 1 [n - k + 1 .. n]) `div` (foldl' (*) 1 [1 .. k])