Return of the Cliquers

No attempts yetTime limit1sMemory limit128 MB

Problem

An undirected graph on nn vertices whose vertices are labeled with the distinct numbers 1,2,,n1, 2, \ldots, n is called a symmetric labeled cliquer when it satisfies both of the following conditions:

  • every connected component is a clique (a complete graph);
  • all of its connected components contain the same number of vertices.

Maurycy has drawn every symmetric labeled cliquer that can be built on nn labeled vertices. He now wants to grade each drawing with one integer from the set {1,2,,m}\{1, 2, \ldots, m\} (two different cliquers may receive the same grade). In how many different ways can he assign the grades? Because the answer can be very large, print it modulo 10940110^9 - 401.

The picture below shows every symmetric labeled cliquer for n=4n = 4.

Input

A single line contains two integers nn and mm (1n21091 \le n \le 2 \cdot 10^9, 1m21091 \le m \le 2 \cdot 10^9), separated by one space: the number of vertices of each symmetric labeled cliquer and the number of available grades.

Output

Print, on a single line, the number of ways to assign the grades, taken modulo 10940110^9 - 401.