#include #include #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define i64 int_fast64_t const i64 INF = INT64_MAX; const i64 ERR = INT64_MIN; const i64 MOD = 998244353; template map prime_factor(T n) { map ret; for (T i = 2; i * i <= n; i++) { T tmp = 0; while (n % i == 0) { tmp++; n /= i; } ret[i] = tmp; } if (n != 1) ret[n] = 1; return ret; } template T divisor_num(T N) { map pf = prime_factor(N); T ret = 1; for (auto p : pf) { ret *= (p.second + 1); } return ret; } long long ans; int main() { i64 N,K,haruka; cin>>N>>K; haruka=N-K; ans=divisor_num(haruka); if(K==0){ cout<