#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 int main(){ long long N,K; cin>>N>>K; long long M = N-K; vector y; for(long long i=1;i*i<=M;i++){ if(M%i==0){ y.push_back(i); if(i*i!=M)y.push_back(M/i); } } int ans = 0; rep(i,y.size()){ if(N%y[i]==K)ans++; } cout<