Blocks 4

Count the tilings of an N by M rectangle using blocks of size k by N (rotatable) for k from 1 to N, modulo 1999, where M can be as large as 1e10.

Hard8Dynamic programmingMathCombinatoricsMatrixNo attempts yetTime limit1sMemory limit256 MB

Problem

You want to fill a rectangle with blocks of several sizes. You have an unlimited supply of 1×N1 \times N blocks, 2×N2 \times N blocks, ..., N×NN \times N blocks. A block may be turned by 90 degrees, so a k×Nk \times N block can be placed as kk rows by NN columns, or as NN rows by kk columns.

Count the ways to fill a rectangle of NN rows and MM columns with no gap and no overlap. Blocks of the same size are not distinguished, so two fillings are the same when the filled shape is the same. The count grows large, so print it modulo 19991999.

Input

The first line contains NN and MM, separated by a single space. (1N1031 \le N \le 10^3, 1M10101 \le M \le 10^{10})

Output

Print the number of ways to fill the rectangle, modulo 19991999.