A local store gives you a credit of C, and you want to spend all of it on exactly two items.
You first walk through the store and write down the price of every item on sale, in order, forming a list L. From this list you pick two items whose prices add up to exactly the credit.
The answer is the pair of positions those two items occupy in the list. The first item in the list is at position 1, and the smaller position is written first.
The first line contains the number of test cases N. N test cases follow, each made of three lines.
Each test case has exactly one solution: only one pair of positions has prices adding up to C.
Limits
For each test case, print one line containing Case #x: followed by the positions of the two items whose prices add up to the credit, separated by a space. Here x is the test case number starting from 1, and the lower position comes first.