#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define MP make_pair #define PB push_back #define inf 1000000007 #define mod 1000000007 #define rep(i,n) for(int i = 0; i < (int)(n); ++i) template vector divisor(T n) { vector res; for(T i=1;(long long)i*i<=n;i++){ if(n%i==0){ res.push_back(i); if(i != n/i){ res.push_back(n/i); } } } sort(res.rbegin(),res.rend()); return res; } #define MAX_N 2000010 #define MOD 1000000007 int inv[MAX_N],fac[MAX_N],finv[MAX_N]; void make() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for(int i=2;i> n >> k; vector res = divisor(n); ll sm = 0; for(int x:res){ if(x==1)continue; if(k%x==0){ int c = k/x; int p = n/x; dp[x] = comb(p,c); for(int i=x+x;i<=n;i+=x){ dp[x] += mod-dp[i]; dp[x] %= mod; } sm += dp[x]; sm %= mod; } } cout << sm << endl; return 0; }