{"raw_statement":[{"iden":"problem statement","content":"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.\nSnuke and Ringo will play the following game.\n\n*   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.\n    \n*   Then, Snuke does the following operation any number of times he likes:\n    *   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.\n\nAt 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?\nLet $w$ be the probability of winning. Then, $w \\times N!$ will be an integer. Compute $w \\times N!$ modulo $(10^9+7)$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 10^7$\n*   $1 \\leq A \\leq \\min(N-1,5000)$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $A$"},{"iden":"sample input 1","content":"3 1"},{"iden":"sample output 1","content":"2\n\nFirst, Snuke will press Button $1$. If Lamp $1$ turns off, he loses. Otherwise, he will press the button that he can now press. If the remaining lamp turns on, he wins; if Lamp $1$ turns off, he loses. The probability of winning in this game is $1/3$, so we should print $(1/3)\\times 3!=2$."},{"iden":"sample input 2","content":"3 2"},{"iden":"sample output 2","content":"3"},{"iden":"sample input 3","content":"8 4"},{"iden":"sample output 3","content":"16776"},{"iden":"sample input 4","content":"9999999 4999"},{"iden":"sample output 4","content":"90395416"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}