Increasing Subsequences

No attempts yetTime limit4sMemory limit128 MB

Problem

A sequence p(1),p(2),,p(N)p(1), p(2), \ldots, p(N) made up of the numbers 1,2,,N1, 2, \ldots, N is called a permutation if all of its elements are distinct.

A permutation pp is said to contain an increasing subsequence of length kk when there exist indices 1i1<i2<<ikN1 \le i_1 < i_2 < \cdots < i_k \le N such that p(i1)<p(i2)<<p(ik)p(i_1) < p(i_2) < \cdots < p(i_k).

When a permutation pp contains an increasing subsequence of length BB but does not contain one of length B+1B+1, the number BB is called the degree of increase of that permutation.

Given a number NN, write a program that counts the permutations whose degree of increase is exactly BB. Because this count can be very large, output its remainder modulo 1,000,000,0001{,}000{,}000{,}000.

Input

The input consists of a single line containing two integers NN and BB (1N401 \le N \le 40, 1B51 \le B \le 5), separated by one or more spaces.

Output

Output a single integer: the number of permutations whose degree of increase is exactly BB, taken modulo 1,000,000,0001{,}000{,}000{,}000.