You must break into a safe whose lock accepts the natural numbers from $1$ to $N$ entered in one fixed secret order. That order is a permutation of $1, 2, \dots, N$, and you know for certain that this permutation has order exactly $K$.
The order of a permutation is the smallest positive integer $m$ such that applying the permutation $m$ times returns every element to its original position. Equivalently, it is the least common multiple of the lengths of the permutation's cycles. For example, the code $2\ 3\ 1$ has order $3$, since $1 \to 3 \to 2 \to 1$, $2 \to 1 \to 3 \to 2$, and $3 \to 2 \to 1 \to 3$.
Knowing the order narrows down how many codes you might have to try, and you want that count exactly. Because you refuse to acknowledge any number larger than the prime $P = 2^{31} - 1$, report the count modulo $P$ (so a count of $2^{31}$, for instance, becomes $2^{31} \bmod P = 1$).
Given $N$ and $K$, determine how many permutations of ${1, \dots, N}$ have order exactly $K$, modulo $2^{31} - 1$.
A single line with two integers $N$ and $K$ ($1 \le N \le 100$, $1 \le K \le 2^{31} - 1$).
Print one integer: the number of permutations of $N$ elements whose order is exactly $K$, taken modulo $2^{31} - 1$.