Time limit: 0.1s
Memory limit: 64MB
Input:
Output:
Bemfa has a new drawing board, which is split into rows, each row contains cells. He has different colors and now he is wondering in how many ways he can color the given board in such a way that each cell is colored with exactly one color and no two neighboring cells have the same color.
Two cells are considered to be neighbors if they share one side.
Help Bemfa count how many ways mod are there to color the board given the above mentioned constraints.
Input data
The first line of the input contains two integers, and .
Output data
The output will contain a single integer, representing the answer to the given test case.
Constraints and Clarifications
- ;
- ;
Example 1
stdin
3 4
stdout
9612