10788: B

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:2 Solved:0

Description

One day Fat Brother get a equation f=(x1+x2)*x3+x4 and four integers y1, y2, y3, y4, he wants to replace each unknown number xi by a known integer yj and make f to be as large as possible. As Fat Brother is taking part in the civil service’s examination, he has no time to deal with it. So your task is to help him calculating this value. Note that the correspondence relation should be one to one.

Input

The first line contains only one integer T, which is the number of test cases.
Each test case starts with four integers’ y1, y2, y3, y4 which describe above.

Output

For each test case, output the case number first, then output the value as large as the number f could be.

Sample Input Copy

4
1 1 1 1
1 2 3 4
-2 -1 1 2
0 0 0 0

Sample Output Copy

Case 1: 3
Case 2: 21
Case 3: 3
Case 4: 0

HINT

T<=100

-10086 <= y1, y2, ycc3, y4 <= 10086