#include #define int long long using namespace std; const int maxn=1e5+10,mod=1e9+7; int n,m,cnt,f=1ll,ans; int pr[maxn],phi[maxn]; bool vis[maxn]; void pre() { phi[1]=1; for(int i=2;i<=1e5;i++) { if(!vis[i]) pr[++cnt]=i,phi[i]=i-1; for(int j=1;j<=cnt&&i*pr[j]<=1e5;j++) { vis[i*pr[j]]=1,phi[i*pr[j]]=phi[i]*(pr[j]-1); if(i%pr[j]==0) { phi[i*pr[j]]=phi[i]*pr[j]; break; } } } } signed main() { // freopen("gcdlcm.in","r",stdin); // freopen("gcdlcm.out","w",stdout); ios::sync_with_stdio(false); cin.tie(0),cout.tie(0); pre(); cin>>n>>m; for(int i=1;i<=n-2;i++) f=f*i%mod; for(int i=2;i<=n/m;i++) ans=(ans+f*phi[i]%mod)%mod; cout<