#Lutece0557. Color

Color

Migrated from Lutece 557 Color

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

ZT loves to paint on papers. One day, he wanted to paint every cell in the board whose size is N×MN \times M with black and white. However, the painted board should meet this condition: for every aa, bb, cc, dd where 0a<c<N0 \leq a < c < N and 0b<d<M0 \leq b < d < M, the cells (a,b)(a, b), (a,d)(a, d), (c,b)(c, b), (c,d)(c, d) are not in the same color. How many different boards can ZT paint?

Note that two boards are different if at least one corresponding cell's color is different.

Input

There are multiple test cases. The first line of the input will be an integer TT (T300T\leq 300) indicating the number of test cases.

For each test case there are two integers NN and MM (1N,M1001 \leq N, M \leq 100) in a single line, representing the size of board.

Output

For each test case, print Case #t: first, in which t is the number of the test case starting from 11. Then output the number of different colored board. The result should be modulo by 2012040220120402.

Samples

4
2 2
2 3
3 3
1 40
Case #1: 14
Case #2: 44
Case #3: 156
Case #4: 12140084

Note

For the first sample, we can color four cells with black or white, except two cases (all black and all white).

Resources

10th UESTC Programming Contest Preliminary