/*#include<stdio.h>
int n,arr[80000]={};
int main()
{
int i;
long long int sum=0;
scanf("%d",&n);
for (i=0;i<n;i++){scanf("%d",&arr[i]);}
for (i=0;i<n;i++){sum+=Sight(i);}
printf("%lld",sum);
return 0;
}
int Sight(int o)
{
int x=o;
long long int sum=0;
while(1)
{
x++;
if(x>=n){break;}
else if(arr[x]<arr[o]){sum++;}
else{break;}
}
return sum;
}*/
/*#include<stdio.h>
int n,arr[500000]={};
int main()
{
int i;
scanf("%d",&n);
for (i=0;i<n;i++){scanf("%d",&arr[i]);}
for (i=0;i<n;i++){F(i);}
}
void F(int o)
{
int x=o;
while(1)
{
x--;
if(x<0){printf("0 ");return;}
else if(arr[x]>=arr[o])
{
printf("%d ",x+1);
return;
}
}
}*/
#include<stdio.h>
#include<math.h>
long long int n,r,arr[30]={},result=1;
int main()
{
int i;
scanf("%d %d",&n,&r);
for(i=r+1;i<=n;i++)
{
Pp(i,2);
}
for(i=2;i<=n-r;i++)
{
Pm(i,2);
}
Result(2);
printf("%lld",result);
}
void Result(int x)
{
result*=pow(x,arr[x]);
result%=100000007;
if(x>=29){return;}
else{Result(x+1);}
return;
}
void Pp(int a,int x)
{
if(x>29){return;}
else if(a%x==0){arr[x]++;Pp(a/x,x);}
else{Pp(a,x+1);}
return;
}
void Pm(int a,int x)
{
if(x>29){return;}
else if(a%x==0){arr[x]--;Pm(a/x,x);}
else{Pm(a,x+1);}
return;
}