#include <bits/stdc++.h>   using namespace std;   template <typename Bp, typename Ep, typename Mp>   inline Mp __powMod(Bp a, Ep b, const Mp &m) {     a %= m;     Mp res = 1;     while (b > 0) {       if (b & 1) {         res = ((long long)res * a) % m;       }       a = ((long long)a * a) % m;       b >>= 1;     }     return res % m;   }   const int MOD = 1e9 + 7;   template <typename Tp>   inline Tp inv(const Tp &x) {     return __powMod(x, MOD - 2, MOD);   }   const int N = 100000 + 5;   int m;   int dp[N];   vector<int> prime;   int mu[N];   bool notPrime[N];   inline void init() {     mu[1] = 1;     for (int i = 2; i < N; ++i) {       if (!notPrime[i]) {         mu[i] = -1;         prime.emplace_back(i);       }       for (const auto &p : prime) {         if (i * p >= N) {           break;         }         notPrime[i * p] = true;         if (i % p == 0) {           mu[i * p] = 0;           break;         } else {           mu[i * p] = -mu[i];         }       }     }   }   int main() {     init();     scanf( %d , &m);     int ans = 1;     for (int i = 2, t; i <= m; ++i) {       if (mu[i] != 0) {         t = m / i;         ans = (ans - (long long)mu[i] * t * inv(m - t) % MOD + MOD) % MOD;       }     }     printf( %d n , ans);   }   