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)

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define sz(x) ((int)x.size())
#define MOD (ll)(1e9+7)
#define INF 1e17
#define int ll
#define EPS (1e-6)
using namespace std;
using ll=long long;
using pii=pair<int,int>;

int gcd(int a,int b) { return b==0?a:gcd(b,a%b); }
int lcm(int a,int b) { return a/gcd(a,b)*b; }

int fpow(int b,int p)
{
	if(p==0) return 1;
	int h=fpow(b,p/2);
	if(p%2) return h*b%MOD*h%MOD;
	return h*h%MOD;
}

vector<int> prime;
bool pr[3010];
void init(){
	memset(pr,-1,sizeof(pr));
	For(i,2,3005){
		if(pr[i]){
			prime.emplace_back(i);
			for(int j=i*2;j<=3005;j+=i) pr[j]=0;
		}
	}
}

void get(vector<int> &cnt,int n){
	int i=0;
	while(n>1){
		while(n%prime[i]==0){
			cnt[i]++;
			n/=prime[i];
		}
		i++;
	}
}

int32_t main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	init();
	vector<int> cnt(sz(prime),0);
	int n; cin>>n;
	//for(auto &i:prime) cout<<i<<"\n";
	For(i,2,n) get(cnt,i);
	int ans=1;
	for(auto &i:cnt) ans=(ans*(i+1))%MOD;
	cout<<ans<<"\n";
	return 0;
}