#include #include #include using namespace std; #define int long long signed main(){ int n,k; cin >> n >> k; n -= k; vector a; for(int i = 1;i * i <= n;i++){ if(i * i == n) a.push_back(i); else if(n % i == 0){ a.push_back(i); a.push_back(n / i); } } sort(a.begin(),a.end()); int k1 = lower_bound(a.begin(),a.end(),k + 1) - a.begin(); if(k1 == n) cout << 0; else{ cout << (int)a.size() - k1; } }