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 <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
#define PRIM 3
#define INF (1 << 29)
#define LINF (1LL << 60)
#define EPS (1e-10)
#define PI 3.1415926535897932384626433832795028
typedef long long Int;
typedef pair<Int, Int> P;
typedef long double Real;
typedef complex<Real> CP;

Int fact[11000000];
Int revfact[11000000];
Int rev[11000000];

void init()
{
    Int m = MOD;
    fact[0] = 1;
    revfact[0] = 1;
    rev[0] = 0;
    rev[1] = 1;
    for (int i = 1; i < 11000000; i++) {
        fact[i] = fact[i - 1] * i % m;
        if (i > 1)
            rev[i] = MOD / i * (MOD - rev[MOD % i]) % MOD;
        revfact[i] = revfact[i - 1] * rev[i] % MOD;
    }
}

Int nCk(Int n, Int k)
{
    if (n < k)
        return 0;
    return fact[n] * revfact[n - k] % MOD * revfact[k] % MOD;
}

Int n, a, ans;
int main()
{
    init();
    cin >> n >> a;
    for (int t = 1; t <= a + 1; t++) {
        int on = t - 1;
        int free = max(0ll, a - t);
        int off = n - a;
        for (int loop = 0; loop <= on; loop++) {
            Int tmp = fact[on - loop + off + free] * (on - loop) % MOD *
                      rev[on - loop + off] % MOD * nCk(on, loop) % MOD;
            if (loop % 2 == 0)
                ans = (ans + tmp) % MOD;
            else
                ans = (ans - tmp) % MOD;
        }
    }
    if (ans < 0)
        ans += MOD;
    cout << ans << endl;
    return 0;
}