using namespace std;
#include <bits/stdc++.h>
typedef long long ll;

ll numtimes(int n, int p);

int main() {

    vector<bool> isprime(500, true);
    for (int i=2; i<500; i++)
        for (int j=2*i; j<500; j+=i)
            isprime[j] = false;
    vector<int> primes;
    for (int i=2; i<500; i++)
        if (isprime[i])
            primes.push_back(i);

    // Read in stuff.
    int n, m;
    while (cin >> n >> m) {

        ll res = 1;
        for (int i=0; i<primes.size(); i++) {

            if (primes[i] > n) break;

            int top = numtimes(n, primes[i]);
            int bot = numtimes(m, primes[i]) + numtimes(n-m, primes[i]);
            res = (res*(top-bot+1));
        }

        cout << res << endl;
    }

    return 0;
}

ll numtimes(int n, int p) {

    ll res = 0;
    while (n>0) {
        res += (n/p);
        n /= p;
    }
    return res;
}
