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>

using namespace std;

#define REP(i,a,b) for(int i = a; i <= b; ++i)
#define PER(i,a,b) for(int i = a; i >= b; --i)
#define MP make_pair
#define PB push_back
#define fi first
#define se second
typedef long long LL;
typedef long double LD;

const int maxn = 1e7;
const int maxa = 5000;
const int P = 1e9+7;

int Fac[maxn+5], InvFac[maxn+5];
LL PowMod(LL a, LL b) { LL r=1; while(b) { if(b&1) r=r*a%P; a=a*a%P, b>>=1; } return r; }
LL C(int n, int m) { return LL(Fac[n]) * InvFac[m] % P * InvFac[n-m] % P; }

void Add(int &a, int b) { a+=b; if(a>=P) a-=P; }
void Sub(int &a, int b) { a-=b; if(a<0) a+=P; }

int main() {
    Fac[0] = 1;
    REP(i,1,maxn) Fac[i] = Fac[i-1] * LL(i) % P;
    InvFac[maxn] = PowMod(Fac[maxn], P-2);
    PER(i,maxn-1,0) InvFac[i] = InvFac[i+1] * LL(i+1) % P;

    int n, m, ans = 0;
    scanf("%d%d", &n, &m), n -= m;
    REP(t,1,m+1) {
        int tmp = 0;
        for(int i = 1; i <= t-1; ++i) {
            LL ha = C(t-1, i);
            ha = ha * Fac[i] % P * Fac[i+n-1] % P;
            if(i >= 1)
                ha = ha * InvFac[i-1] % P;
            if(t <= m)
                ha = ha * Fac[i+n+m-t] % P * InvFac[i+n] % P;
            if((t-1-i)&1) Sub(tmp, ha);
            else Add(tmp, ha);
        }
        Add(ans, tmp);
    }
    printf("%d\n", ans);
    return 0;
}