
Petryk has a circular garland consisting of lamps, and he has different colors to paint them. He wants to color the garland so that no two adjacent lamps are the same color. How many ways can Petryk color the garland under this condition?
The first line contains two integers and (1 \le n, k \le 15): the number of lamps and the number of colors, respectively.
Print the number of possible ways to color the garland. If it is impossible to color the garland according to the described requirements, print -1.
Example 1