PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000349. Đếm dãy chia hết liên tiếp (Mashmokh and ACM)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Đếm dãy chia hết liên tiếp (Mashmokh and ACM)

Mashmokh and ACM

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Count sequences B1,B2,…,BKB_1,B_2,\ldots,B_K of length exactly KK with values in [1,N][1,N], such that each value divides the following value: Bi+1 mod Bi=0B_{i+1}\bmod B_i=0.

Equal adjacent values are permitted. Output the number of valid sequences modulo 109+710^9+7.

Input

One line contains integers NN and KK.

Output

Print the count modulo 109+710^9+7.

Subtasks

  • Subtask 1 (20 points): 1≤N,K≤81\le N,K\le8.
  • Subtask 2 (30 points): 1≤N,K≤2501\le N,K\le250.
  • Subtask 3 (50 points): 1≤N,K≤20001\le N,K\le2000.

Examples

Example 1

Input

3 2

Output

5

Explanation

The five valid pairs are (1,1),(1,2),(1,3),(2,2),(3,3)(1,1),(1,2),(1,3),(2,2),(3,3). In each pair, the first value divides the second.

Example 2

Input

6 4

Output

39

Explanation

Start from dp1(v)=1dp_1(v)=1; for each extension, add dpt(d)dp_t(d) to dpt+1(v)dp_{t+1}(v) whenever dd divides vv. The length-four total is 39.