import Data.List

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

factor 1 = []
factor n = let divisors = dropWhile ((/= 0) . mod n) [2..ceiling . sqrt $ fromIntegral n]
           in let prime = if null divisors then n else head divisors
              in (prime:) $ factor $ div n prime

solve :: [Int] -> Int
solve [] = 1
solve (n:ns) = (n * solve ns) `mod` (10^9+7)

main :: IO ()
main = do
  n <- factorial <$> readLn
  print . solve . map ((+1) . length) . group $ factor n