You have roses of different colors. In particular, you have roses of each color. Please compute the number of ways to plant all the roses in a line of pots, one rose per pot, in such a way that there is exactly one pair of adjacent roses of the same color. The roses of the same color are indistinguishable.
Input consists of several cases, each with and . Assume that is either 2 or 3. For , we have . For , we have .
For every case, print the answer modulo .
Input
2 2 3 1 3 2 3 200
Output
2 0 36 73999084