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 forn(i,n) for(int i=0;i<(int)(n);i++)
#define si(c) ((int)(c).size())
#define forsn(i,s,n) for(int i = (int)(s); i<((int)n); i++)
#define dforsn(i,s,n) for(int i = (int)(n)-1; i>=((int)s); i--)
#define all(c) (c).begin(), (c).end()
#define D(a) cerr << #a << "=" << a << endl;
#define pb push_back
#define eb emplace_back
#define mp make_pair
 
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
mt19937_64 rng;

const int 
    M = 1e7 + 10,
    MOD = 1e9 + 7;

int inv[M], fact[M], ifact[M];

int comb(int m, int n) {
    if (m < 0 || n < 0 || n > m) return 0;
    return (ll) fact[m] * ifact[n] % MOD * ifact[m-n] % MOD;
}

int f(int a, int b, int c) {
    return (ll) fact[a+b+c] * inv[a+b] % MOD * a % MOD;
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    rng.seed(time(0));

    inv[1] = 1;
    forsn(n,2,M) {
        inv[n] = ll(MOD - MOD/n) * inv[MOD%n] % MOD;
        assert((ll) inv[n] * n % MOD == 1);
    }
    fact[0] = ifact[0] = 1;
    forsn(n,1,M) {
        fact[n] = ll(n) * fact[n-1] % MOD;
        ifact[n] = ll(inv[n]) * ifact[n-1] % MOD;
        assert((ll) fact[n] * ifact[n] % MOD == 1);
    }

    ll ans = 0;
    int n,a; cin >> n >> a;
    for (int i = 1; i < a; i++) {
        for (int k = 0; k <= i; k++) {
            ll sign = k%2 ? MOD - 1 : 1;
            ans += sign * comb(i,k) % MOD * f(i-k, n-a, a-1-i) % MOD;
        }
    }
    for (int k = 0; k <= a; k++) {
        ll sign = k%2 ? MOD - 1 : 1;
        ans += sign * comb(a,k) % MOD * f(a-k, n-a, 0) % MOD;
    }

    cout << ans%MOD << endl;
    return 0;
}