#include #include using namespace std; using namespace atcoder; // type typedef long long ll; typedef long double ld; template using pq = priority_queue; template using pqg = priority_queue, greater>; template using v = vector; #define pl pair #define vl v #define vp v #define vm v // IN-OUT #define NYAN ios::sync_with_stdio(false);cin.tie(nullptr);cout< void CIN(T &t, U &...u) { cin >> t; CIN(u...); } void COUT() { cout << "\n"; } template void COUT(const T &t, const U &...u) { cout << t; if (sizeof...(u)) cout << sep; COUT(u...); } #define dump(x) cerr << #x << ":"<< x << "\n"; #define vdump(x) rep(repeat, sz(x)) cerr << repeat << ":" << x[repeat] << "\n"; // macro #define bp __builtin_popcountll #define ALL(x) x.begin(),x.end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define reps(i, s, n) for (ll i = s; i < (ll)(n); i++) #define sz(x) (ll)x.size() ll xd[]={0, 1, 0, -1, 1, 1, -1, -1}; ll yd[]={1, 0, -1, 0, 1, -1, -1, 1}; // function templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> n >> p; vl num(n + 1); ll P = p; while(p <= n){ for(ll i = p; i <= n; i += p) num[i]++; p *= P; } ll sum = accumulate(ALL(num), 0LL); using mint1 = modint; mint1::set_mod(1000000007 - 1); mint1 x = 1; mint y = 1; reps(i, 1, n + 1) x *= i; reps(i, 1, n + 1) y *= i; y = y.pow(x.val()); cout << ((mint)sum * y.val()).val() << "\n"; } int main() { NYAN solve(); return 0; }