Given a rectangular grid of height H and width W. A problem setter wants to draw a pair of circles inside the rectangle so that they touch each other but do not share common area and both the circles are completely inside the rectangle. As the problem setter does not like precision he also wants their centers on integer coordinates and their radii to be positive integers as well. How many different ways can he draw such pair of circles? Two drawings are different from each other if any of the circles has different center location or radius.
The first line of input contains the number of test cases T (T ≤ 500). Each of the next T lines will contain two integers H and W (0 < H, W ≤ 1000).
For each line of input output the case number and the number of ways of drawing such pairs of circles maintaining the mentioned constraints. See sample output for exact formatting. The output will fit into 64-bit signed integer.
Case 1: 1
Illustration of case 3: