Scanf.scanf "%d" (fun n ->
    let d = Array.make (n + 1) 0 in
    for i = 2 to n do
        let rec loop rest cur =
            if rest = 1 then () else
            if rest < cur * cur then d.(rest) <- d.(rest) + 1 else
                if rest mod cur = 0 then (d.(cur) <- d.(cur) + 1; loop (rest / cur) cur) else
                    loop rest (cur + 1)
        in
        loop i 2
    done;
    let ( *@) a b = (a * b) mod 1000000007 in
    Array.fold_left (fun acc v -> acc *@ (v + 1)) 1 d |> Printf.printf "%d\n"
)