#include<bits/stdc++.h>
using namespace std;
long long n,m,p,s1,s2,s3,s4;
long long poww(long long a, long long b) {
long long ans = 1, base = a;
while (b != 0) {
if (b & 1 != 0)
ans=(ans%p)*(base%p)%p;
base=(base%p)*(base%p)%p;
b >>= 1;
}
return ans;
}
long long jc(long long a){
long long s=1;
for(int i=2;i<=a;i++){
s=(s%p)*(i%p)%p;
}
return s;
}
int main(){
cin>>n>>m;
p=100000007;
s1=jc(n);
s2=jc(m);
s3=jc(n-m);
s4=(s1%p)*(poww(s2*s3,p-2)%p)%p;
cout<<s4<<endl;
return 0;
}