#define P 1000000007
#include<bits/stdc++.h>
using namespace std;
int fac[200005],inv[200005];
inline void Pre(int n){
int i;
for(fac[0]=1,i=1;i<=n;++i) fac[i]=1ll*fac[i-1]*i%P;
for(inv[0]=inv[1]=1,i=2;i<=n;++i) inv[i]=1ll*(P-P/i)*inv[P%i]%P;
for(i=1;i<=n;++i) inv[i]=1ll*inv[i]*inv[i-1]%P;
}
inline int C(int x,int y){return 1ll*fac[x]*inv[y]%P*inv[x-y]%P;}
int main()
{
Pre(200004);
int n,m;
while(cin>>n>>m)
{
cout<<C(n,m)<<endl;
}
}