Let's define a function f(p) on a permutation p as follows. Let g_i be the [greatest common divisor (GCD)](https://en.wikipedia.org/wiki/Greatest_common_divisor) of elements p_1, p_2, ..., p_i (in other words, it is the GCD of the prefix of length i). Then f(p) is the number of distinct elements among g_1, g_2, ..., g_n.

Let f_{max}(n) be the maximum value of f(p) among all permutations p of integers 1, 2, ..., n.

Given an integers n, count the number of permutations p of integers 1, 2, ..., n, such that f(p) is equal to f_{max}(n). Since the answer may be large, print the remainder of its division by 1000 000 007 = 10^9 + 7.

Input

The only line contains the integer n (2 ≤ n ≤ 10^6) — the length of the permutations.

Output

The only line should contain your answer modulo 10^9+7.

Examples

Input


2


Output


1

Input


3


Output


4

Input


6


Output


120

Note

Consider the second example: these are the permutations of length 3:

  * [1,2,3], f(p)=1. 
  * [1,3,2], f(p)=1. 
  * [2,1,3], f(p)=2. 
  * [2,3,1], f(p)=2. 
  * [3,1,2], f(p)=2. 
  * [3,2,1], f(p)=2. 



The maximum value f_{max}(3) = 2, and there are 4 permutations p such that f(p)=2.
#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int FFTMOD = 119 << 23 | 1;
const int INF = (int)1e9 + 23111992;
const long long LINF = (long long)1e18 + 23111992;
const long double PI = acos((long double)-1);
const long double EPS = 1e-9;
inline long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
template <class T>
inline int chkmin(T& a, const T& val) {
  return val < a ? a = val, 1 : 0;
}
template <class T>
inline int chkmax(T& a, const T& val) {
  return a < val ? a = val, 1 : 0;
}
inline unsigned long long isqrt(unsigned long long k) {
  unsigned long long r = sqrt(k) + 1;
  while (r * r > k) r--;
  return r;
}
inline long long icbrt(long long k) {
  long long r = cbrt(k) + 1;
  while (r * r * r > k) r--;
  return r;
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
inline int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }
inline int sign(long double x) { return x < -EPS ? -1 : x > +EPS; }
inline int sign(long double x, long double y) { return sign(x - y); }
mt19937 mt(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int mrand() { return abs((int)mt()); }
void chemthan() {
  int n;
  cin >> n;
  vector<int> fac(n + 1), ifac(n + 1);
  fac[0] = 1;
  for (int i = (1); i < (n + 1); ++i) fac[i] = mult(fac[i - 1], i);
  for (int i = (0); i < (n + 1); ++i) ifac[i] = inv(fac[i]);
  auto binom = [&](int n, int k) {
    return mult(fac[n], mult(ifac[k], ifac[n - k]));
  };
  vector<int> sp(n + 1);
  vector<vector<int> > prs(n + 1);
  for (int i = (1); i < (n + 1); ++i) sp[i] = i;
  for (int i = (2); i < (n + 1); ++i)
    if (sp[i] == i) {
      for (int j = i; j <= n; j += i) {
        chkmin(sp[j], i);
        prs[j].push_back(i);
      }
    }
  int mx = 0;
  vector<int> fmx(n + 1);
  for (int i = (1); i < (n + 1); ++i) {
    int t = i, cnt = 0;
    while (1 < t) {
      cnt++, t /= sp[t];
    }
    chkmax(mx, cnt);
    fmx[i] = cnt;
  }
  vector<int> dp(n + 1, -1);
  function<int(int)> calc = [&](int u) {
    if (u == 1) return 1;
    int& res = dp[u];
    if (~res) return res;
    res = 0;
    for (int d : prs[u]) {
      int nu = u / d;
      int x = n - n / u;
      int y = n / nu - n / u;
      addmod(res, mult(calc(nu), mult(fac[y], binom(x - 1, y - 1))));
    }
    return res;
  };
  int res = 0;
  for (int i = (2); i < (n + 1); ++i)
    if (mx == fmx[i]) {
      addmod(res, calc(i));
    }
  cout << res << "\n";
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(0), cin.tie(0);
  if (argc > 1) {
    assert(freopen(argv[1], "r", stdin));
  }
  if (argc > 2) {
    assert(freopen(argv[2], "wb", stdout));
  }
  chemthan();
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
