{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}

import Control.Applicative
import Control.Monad
import Control.Arrow
import Data.List
import Data.Maybe
import Data.Char
import qualified Data.ByteString.Char8 as B
import Text.Printf
import Debug.Trace

import Control.Monad.ST
import Data.Array.ST

primeFactors = f 2
	where
		f p n
			| n <= 1 = []
			| p > n = [ n ]
			| n `mod` p == 0 = p : f p ( n `div` p )
			| otherwise = f ( p + 1 ) n

readInt = ( readLn :: IO Int )
readInts = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine

which a b f = if f then a else b
mp [ a, b ] = ( a, b )

main = readLn >>= print . foldl ( \a b -> ( a * b ) `mod` 1000000007 ) 1 . map ( fromIntegral . succ . length ) .  group . sort . concatMap primeFactors . flip take [ 1 .. ]