Problem:
Score : 300 points

Problem Statement

You are given an integer N.
Find the number of the positive divisors of N!, modulo 10^9+7.

Constraints

1≤N≤10^3

Input

The input is given from Standard Input in the following format:

N

Output

Print the number of the positive divisors of N!, modulo 10^9+7.

Sample Input 1

3

Sample Output 1

4

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.

Sample Input 2

6

Sample Output 2

30

Sample Input 3

1000

Sample Output 3

972926972

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>
#include<list>

#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000001;

using namespace std;



int main(void) {
	int n;
	int dp[1001];
	long long int total = 1;
	int p;
	
	FOR(i, 0, 1000) {
		dp[i] = 1;
	}

	cin >> n;
	FOR(i, 2, n) {
		p = i;
		FOR(t, 2, 1000) {
			while (p % t == 0) {
				dp[t]++;
				p = p / t;
				if (p == 1) {
					break;
				}
			}
			if (p == 1) {
				break;
			}
		}
	}
	FOR(i, 1, n) {
		total *= dp[i];
		if (total > MOD) {
			total %= MOD;
		}
	}
	cout << total << endl;
	return 0;
}