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 <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define all(x) x.begin(),x.end()
#define cmin(a,b) (a>b?a=b:a)
#define cmax(a,b) (a<b?a=b:a)
#define mem(a,k) memset(a,k,sizeof(a))
#define lop(i,s,t) for(int i=s;i<(t);++i)
#define rep(i,s,t) for(int i=s;i<=(t);++i)
#define dec(i,s,t) for(int i=s;i>=(t);--i)
#define fore(i,v) for(int i=g[v],d=es[i].d;i;i=es[i].nxt,d=es[i].d)
using namespace std;

#ifdef CURIOUSCAT
#define Pr(f,...) fprintf(stderr,f,##__VA_ARGS__),fflush(stderr)
#else
#define Pr(f,...) 
#endif

typedef long long ll;

template<typename T>
void read(T &x){
	x=0; 
	char c;
	for(c=getchar();!isdigit(c);c=getchar()); 
	for(;isdigit(c);c=getchar())x=x*10+c-'0'; 
}

const int P=1e9+7,oo=P;

int mul(int a,int b){ return 1ll*a*b%P; }
int add(int a,int b){ a+=b; return a>=P?a-P:a; }
void upd(int &a,int b){ a=add(a,b); }
int sub(int a,int b){ a-=b; return a<0?a+P:a; }
int gcd(int a,int b){ return !b?a:gcd(b,a%b); }

const int N=1e7+50;
int n,fac[N],a,ans,inv[N],facinv[N];
int C(int n,int m){
	if(n<0||m>n)return 0;
	return mul(fac[n],mul(facinv[m],facinv[n-m])); 
}

int main(int argc,char *argv[]){
#ifdef CURIOUSCAT
	freopen("d.in","r",stdin); 
#endif
	read(n),read(a); 
	fac[0]=1; 
	rep(i,1,n)fac[i]=mul(fac[i-1],i);
	inv[1]=1; 
	rep(i,2,n)inv[i]=mul(P-P/i,inv[P%i]); 
	facinv[0]=1; 
	rep(i,1,n)facinv[i]=mul(facinv[i-1],inv[i]);
	rep(t,2,a+1){
		int x=t-1,y=n-a,z=max(0,a-t);
		//Pr("%d,%d,%d\n",x,y,z);
		rep(d,0,a){
			int w=mul(C(x,d),mul(x-d,inv[x-d+y]));
			w=mul(w,fac[x-d+y+z]);
			if(d&1)ans=sub(ans,w);else ans=add(ans,w);
		}
	}
	cout<<ans<<endl;
}