Problem: We have N lamps numbered 1 to N, and N buttons numbered 1 to N. Initially, Lamp 1, 2, \cdots, A are on, and the other lamps are off.

Snuke and Ringo will play the following game.

* First, Ringo generates a permutation (p_1,p_2,\cdots,p_N) of (1,2,\cdots,N). The permutation is chosen from all N! possible permutations with equal probability, without being informed to Snuke.

* Then, Snuke does the following operation any number of times he likes:

* Choose a lamp that is on at the moment. (The operation cannot be done if there is no such lamp.) Let Lamp i be the chosen lamp. Press Button i, which switches the state of Lamp p_i. That is, Lamp p_i will be turned off if it is on, and vice versa.



At every moment, Snuke knows which lamps are on. Snuke wins if all the lamps are on, and he will surrender when it turns out that he cannot win. What is the probability of winning when Snuke plays optimally?

Let w be the probability of winning. Then, w \times N! will be an integer. Compute w \times N! modulo (10^9+7).

Constraints

* 2 \leq N \leq 10^7
* 1 \leq A \leq \min(N-1,5000)

Input

Input is given from Standard Input in the following format:


N A


Output

Print w \times N! modulo (10^9+7), where w is the probability of Snuke's winning.

Examples

Input

3 1


Output

2


Input

3 2


Output

3


Input

8 4


Output

16776


Input

9999999 4999


Output

90395416

Solution (in CPP):

Solution:
#include <iostream>
#include<set>
#include<vector>
#include<string>
using namespace std;
const int mod=1000000007;
int add(int a, int b)
{
	int c=a+b;
	if(c>=mod)c-=mod;
	return c;
}
int dif(int a, int b)
{
	int c=a-b;
	if(c<0)c+=mod;
	return c;
}
int mlt(int a, int b)
{
	long long c=a*1LL*b;
	return c%mod;
}
int bp(int a, int b)
{
	if(b==0)return 1;
	if(b%2==0)
	{
		int val=bp(a, b/2);
		return mlt(val, val);
	}
	if(b%2==1)
	{
		int val=bp(a, b-1);
		return mlt(val, a);
	}
}
int inv(int a)
{
	return bp(a, mod-2);
}
void outp(vector<vector<int>>&v)
{
	for(int i=0; i<v.size(); i++)
	{
		for(int j=0; j<v[i].size(); j++)cout<<v[i][j]<<' ';
		cout<<endl;
	}
	cout<<endl;
}
int maxn=1e7+7;
vector<int>fact(maxn), ofact(maxn);
int C(int a, int b)
{
	if(b<0)return 0;
	if(a<0)return 0;
	if(a>b)return 0;
	int val=fact[b];
	val=mlt(val, ofact[a]);
	val=mlt(val, ofact[b-a]);
	return val;
}
int main()
{
	fact[0]=1;
	ofact[0]=1;
	for(int i=1; i<maxn; i++)
	{
		fact[i]=mlt(fact[i-1], i);
	}
	ofact[maxn-1]=inv(fact[maxn-1]);
	for(int j=maxn-2; j>=1; j--)
	{
		ofact[j]=mlt(ofact[j+1], j+1);
	}
	int n, a;
	cin>>n>>a;
	int all=0;
	int d=n-a;
	vector<int>fat(a+2), us(a+2);
	us[0]=1;
	int ans=fact[a];
	for(int i=a-1; i>=1; i--)
	{
		vector<int>newfat(a+2), newus(a+2);
		for(int j=0; j<=a; j++)
		{
			newfat[j]= mlt(i,us[j]);
			newus[j+1]=us[j];
		}
		for(int j=0; j<=a; j++)
		{
			newfat[j]= add(newfat[j],mlt(i,fat[j]));
			newus[j]=add(newus[j], fat[j]);
		}
		fat=newfat;
		us=newus;
		for(int j=0; j<=a; j++)
		{
			int val=add(fat[j], us[j]);
			val=mlt(val, C(a-i, a-i+d-1-j));
			val=mlt(val, fact[i]);
			ans=add(ans, val);
		}
	}
	cout<<mlt(ans, fact[d])<<endl;
}