#include #include const long long MOD=(long long)1e9+7; const long long MAXN=1123456; long long fac[MAXN]; long long ifac[MAXN]; long long inv[MAXN]; long long comb(long long n, long long k) { return fac[n]*ifac[k]%MOD*ifac[n-k]%MOD; } int main() { fac[0]=fac[1]=ifac[0]=ifac[1]=inv[0]=inv[1]=1; for (int i=2;i>N; std::cin>>K; long long ans=0; std::vector cnt(N+1, 0); for (long long i=2;i<=N;++i) {//i-fold symmetry if (K%i!=0) continue; if (N%i!=0) continue; for (int j=i*2;j<=N;j+=i) { cnt[j]=(cnt[j]+1-cnt[i])%MOD; } ans=(ans+(1-cnt[i])*comb(N/i, K/i)%MOD+MOD)%MOD; } std::cout<