#include using namespace std; template vector divisor(T n){ T rt = sqrt(n); vector res, resB; for(T i = 1; i * i <= n; i++){ if(n % i == 0){ res.push_back(i); T j = n / i; if(j != rt){ resB.push_back(j); } } } for(int i = (int) resB.size() - 1; i >= 0; i--){ res.push_back(resB[i]); } return res; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); long long n, k; cin >> n >> k; long long m = n - k; int ans = 0; vector div = divisor(m); for(auto &x : div){ if(x > k) ans++; } cout << ans << endl; }