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 <sstream>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#include <deque>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstring>
#include <climits>
#include <cctype>
#include <cassert>
#include <functional>
#include <iterator>
#include <iomanip>
using namespace std;
//#pragma comment(linker,"/STACK:102400000,1024000")

#define sti				set<int>
#define stpii			set<pair<int, int> >
#define mpii			map<int,int>
#define vi				vector<int>
#define pii				pair<int,int>
#define vpii			vector<pair<int,int> >
#define rep(i, a, n) 	for (int i=a;i<n;++i)
#define per(i, a, n) 	for (int i=n-1;i>=a;--i)
#define clr				clear
#define pb 				push_back
#define mp 				make_pair
#define fir				first
#define sec				second
#define all(x) 			(x).begin(),(x).end()
#define SZ(x) 			((int)(x).size())
#define lson			l, mid, rt<<1
#define rson			mid+1, r, rt<<1|1
#define getBits(x)		__builtin_popcount(x)
#define getBitIdx(x)	__builtin_ffs(x)

typedef long long LL;
const int maxn = 1005;
const int mod = 1e9+7;
bool visit[maxn];
int a[maxn], na = 0;
int C[maxn];
LL dp[maxn];

void init() {
	memset(visit, true, sizeof(visit));
	visit[0] = visit[1] = false;
	a[na++] = 1;
	for (int i=2; i<maxn; ++i) {
		if (visit[i]) {
			a[na++] = i;
			for (int j=i+i; j<maxn; j+=i)
				visit[j] = true;
		}
	}
}

inline int getId(int x) {
	return lower_bound(a, a+na, x) - a;
}

void solve(int n) {
	if (n == 1) {
		puts("1");
		return ;
	}
	
	for (int i=2; i<=n; ++i) {
		int x = i;
		for (int j=2; j*j<=x; ++j) {
			if (x%j == 0) {
				int id = getId(j);
				while (x%j == 0) {
					x /= j;
					++C[id];
				}
			}
		}
		if (x > 1) {
			int id = getId(x);
			++C[id];
		}
	}
	
	dp[0] = 1;
	for (int i=1; i<na; ++i) {
		// if (C[i] == 0) {
			// dp[i] = dp[i-1];
			// continue;
		// }
		
		dp[i] = dp[i-1] * (1 + C[i]) % mod;
	}
	
	LL ans = dp[na-1];
	cout << ans << endl;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	// #ifndef ONLINE_JUDGE
		// freopen("data.in", "r", stdin);
		// freopen("data.out", "w", stdout);
	// #endif
	
	int n;
	
	init();
	cin >> n;
	solve(n);
	
	// #ifndef ONLINE_JUDGE
		// printf("time = %ldms.\n", clock());
	// #endif
	
	return 0;
}