#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> A >> B; int ans = 0; for(int i = 1; i*i <= A; ++i){ if(A % i != 0) continue; if(i % B == 0) ans++; if(i*i != A){ if((A/i) % B == 0) ans++; } } cout << ans << endl; return 0; }