PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000181. Số ước của giai thừa (Factors of Factorial)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Số ước của giai thừa (Factors of Factorial)

Factors of Factorial

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

For a positive integer NN, let N!=1⋅2⋯NN!=1\cdot2\cdots N. Count all distinct positive divisors of N!N! and print the count modulo 109+710^9+7.

Input

The input contains an integer NN.

Output

Print the number of positive divisors of N!N! modulo 109+710^9+7.

Subtasks

  • Subtask 1 (20 points): 1≤N≤201 \le N \le 20.

  • Subtask 2 (30 points): 1≤N≤2001 \le N \le 200.

  • Subtask 3 (50 points): 1≤N≤10001 \le N \le 1000.

Examples

Example 1

Input

3

Output

4

Explanation

Since 3!=63!=6 has divisors 1,2,3,61,2,3,6, the result is 44.

Example 2

Input

6

Output

30

Explanation

We have 6!=720=24⋅32⋅56!=720=2^4\cdot3^2\cdot5, giving (4+1)(2+1)(1+1)=30(4+1)(2+1)(1+1)=30 divisors.

Example 3

Input

1000

Output

972926972

Explanation

Applying the prime-exponent divisor-count formula to 1000!1000! and reducing modulo 109+710^9+7 gives 972926972972926972.