This page is still under construction.

Parts of this page are still being built. What you see may change.

Favorite Array

Interview

Time limit2sMemory limit512 MB

Summary
Count length-N arrays with entries from 1 to K where no earlier element is a larger multiple of the next.
Level

Medium6 of 10

Topics
Dynamic programming, Combinatorics, Math
Solved
No attempts yet

Problem

Seonggwan likes an array that satisfies all of the following.

  • The array has length NN.
  • Every element of the array is an integer between 11 and KK, inclusive.
  • For any two neighboring elements, with AA first and BB second, either A≤BA \le B or A mod B≠0A \bmod B \ne 0 holds.

In other words, the only forbidden pair is one where the earlier element is larger than the later element and is divisible by it.

For N=4N = 4 and K=7K = 7, the array [1,7,7,2][1, 7, 7, 2] is one Seonggwan likes. Its three neighboring pairs satisfy 1≤71 \le 7, 7≤77 \le 7, and 7 mod 2≠07 \bmod 2 \ne 0.

Given NN and KK, write a program that counts the arrays Seonggwan likes.

Input

The first line contains NN and KK, separated by a space. (1≤N≤101 \le N \le 10, 1≤K≤1000001 \le K \le 100000)

Output

Print on the first line the number of arrays Seonggwan likes, modulo 1,000,000,007.

Examples5

  1. Example 1

    Input
    2 2
    
    Expected output
    3
    
  2. Example 2

    Input
    9 1
    
    Expected output
    1
    
  3. Example 3

    Input
    3 3
    
    Expected output
    15
    
  4. Example 4

    Input
    1 107
    
    Expected output
    107
    
  5. Example 5

    Input
    2 10
    
    Expected output
    83