(* O(n log n) *)
let n = read_int ()
let primes n =
  if n <= 1 then [|false; false|]
  else
    let flags = Array.make (n + 1) true in
    flags.(0) <- false; flags.(1) <- false;
    for i = 2 to n do
      if flags.(i) then
        let j = ref @@ i + i in
        while !j <= n do flags.(!j) <- false; j := !j + i done done;
    flags
let rec ord_fact i n = let rec f m = if n / m = 0 then 0 else n / m + f (m * i) in f i
let ans = ref 1
let _ =
  Array.iteri (fun i b -> if b then ans := !ans * (ord_fact i n + 1) mod 1_000_000_007) @@ primes n;
  Printf.printf "%d\n" @@ !ans