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 signed int inf_i32 = 0x6fffffff;
const unsigned int inf_u32 = 0xefffffff;
const signed long long inf_i64 = 0x6fffffffffffffff;
const unsigned long long inf_u64 = 0xefffffffffffffff;
auto main() -> signed int {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  unsigned int n;
  cin >> n;
  vector<unsigned int> bigf(n + 1);
  for (unsigned int i = 1; i <= n; i++) {
    for (unsigned int j = 2 * i; j <= n; j += i) {
      bigf[j] = i;
    }
  }
  vector<map<unsigned int, unsigned int>> prmf(n + 1);
  vector<unsigned int> sump(n + 1);
  unsigned int maxsump = 0;
  for (unsigned int i = 2; i <= n; i++) {
    if (bigf[i] == 1) {
      prmf[i][i] = 1;
      sump[i] = 1;
    } else {
      unsigned int j = bigf[i];
      unsigned int k = i / j;
      for (auto [prm, pwr] : prmf[j]) {
        prmf[i][prm] += pwr;
      }
      for (auto [prm, pwr] : prmf[k]) {
        prmf[i][prm] += pwr;
      }
      for (auto [prm, pwr] : prmf[i]) {
        sump[i] += pwr;
      }
    }
    maxsump = max(sump[i], maxsump);
  }
  vector<unsigned int> v;
  for (unsigned int i = 2; i <= n; i++) {
    if (sump[i] == maxsump) v.push_back(i);
  }
  const unsigned int m = 1e9 + 7;
  vector<unsigned int> fac(n + 1, 1);
  for (unsigned int i = 2; i <= n; i++) {
    fac[i] = fac[i - 1] * i % m;
  }
  vector<map<unsigned int, unsigned long long>> dp(n + 1);
  for (auto u : v) {
    dp[1][u] = 1;
  }
  for (signed int i = 0; i < n; i++) {
    for (auto [u, cnt] : dp[i]) {
      if (n / u - i > 0)
        dp[i + 1][u] = (dp[i + 1][u] + dp[i][u] * (n / u - i) % m) % m;
      for (auto [p, _] : prmf[u]) {
        if (n / u > 0)
          dp[i + 1][u / p] =
              (dp[i + 1][u / p] + dp[i][u] * (n / (u / p) - n / u) % m) % m;
      }
    }
  }
  cout << dp[n][1];
  cout << "\n";
  return 0;
}
