Sequence Transformation

Count length-n integer sequences with entries in [1, 2^k) whose prefix bitwise-OR values are strictly increasing, for n up to 1e18 and k up to 30000.

Hard8CombinatoricsBit manipulationMathDynamic programmingNo attempts yetTime limit10sMemory limit512 MB

Problem

Applying operation PP to the sequence A=a1,a2,,anA = a_1, a_2, \dots, a_n produces the sequence B=b1,b2,,bnB = b_1, b_2, \dots, b_n, where bi=a1a2aib_i = a_1 \mathbin{|} a_2 \mathbin{|} \cdots \mathbin{|} a_i and | is the bitwise OR operation.

Apply PP to every sequence of length nn whose entries are integers at least 11 and less than 2k2^k. Write a program that counts the sequences whose result is increasing, that is, b1<b2<<bnb_1 < b_2 < \cdots < b_n.

Input

The first line contains nn and kk, separated by a space. (1n10181 \le n \le 10^{18}, 1k300001 \le k \le 30000)

Output

Print the number of such sequences modulo 109+710^9+7 on the first line.