#include #include #include using namespace std; const int LIM=1e7; bool isp[LIM+1]; vectorps; vectorval; void f(int N,int coef) { for(int i=0;i=ps[i]) { c+=n/=ps[i]; } val[i]+=c*coef; } } main() { for(int i=2;i<=LIM;i++)if(!isp[i]) { ps.push_back(i); val.push_back(0); for(int j=i+i;j<=LIM;j+=i)isp[j]=true; } int M,N;cin>>M>>N; f(M,1); f(N,-1); f(M-N,-1); long long ans=1; for(int i=0;i