#include #include using namespace std; int main() { int A, B, count = 0; cin >> A >> B; for (int i = 1; i <= sqrt(A); i++) { if (A % i != 0) continue; if ((A/i) % B == 0) count++; } cout << count << endl; return 0; }