+ Time Limit : 1 seconds
+ Memory Limit : 256 megabytes
---------------------------
*Shengdebao* has recently created a bank account, and being a cautious fellow, he wants to make sure of the bank's security policies.
Financial experts have come up with a new formula to calculate the amount of security in a bank account. They introduce the amount of security as a quantity represented by a number, this number is calculated as follows:
If a bank has $n$ doors and $k$ seats this value is equal to the number of ways to choose $k$ distinct numbers from $1$ to $n$ so that if we write the pairwise difference between any two (the difference between numbers $a$ and $b$ is expressed as $|a-b|$) values (which will be exactly $\frac{k \times (k-1)}{2}$ values), the *gcd* (greatest common divisor) of **every pair** of these $\frac{k \times (k-1)}{2}$ integers will be $1$ or in other words these values must be pairwise coprime!
*Shengdebao* was quite surprised by the formula and could not find the relevency between this and the security, but who is he to question the experts! So he started counting the number of doors and seats in his bank.
Given the number of doors and seats, help him calculate the amount of security in his bank account.
# Input
In the only line of input the values $n$ (number of doors) and $k$ (the number of seats) are given in the same order.
$$ 1 \le n , k \le 2\ 000$$
# Output
Output only one line the security of the bank. Since the number can be quite large output it modulo $10^9 + 7$.
# Examples
## Sample input 1
```
4 4
```
## Sample output 1
```
0
```
## Sample input 2
```
4 3
```
## Sample output 2
```
4
```
*Explanation:* In this test if we choose three distinct numbers in **anyway** the conditions will be satisfied.
For example by choosing 1 , 2 and 4 the differences will be equal to 1 , 2 and 3 which are pairwise coprime.
## Sample input 3
```
5 2
```
## Sample output 3
```
10
```
*Explanation:* Any pair of numbers chosen will only make exactly **one** difference which satisfies the criteria.
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.