R  — In The Airport

Time Limit: 1 sec
Memory Limit: 32 MB

It’s a Wednesday night and Bob is sitting at the airport and waiting for an airplain to Lithuania. The challenge he is facing is to come up with an easy task for the qualification contest on Saturday in KTU. Unfortunately, he doesn’t have any more ideas because it’s already late and he is too exhausted.

To freshen up, he thinks that he should get a drink and a piece of cake. Waitress gives Bob a menu to choose from. As he was too busy thinking about how tired he is, he simply decided to go for a drink and piece of cake which are the closest to the average of all items on the menu. If he needs to choose, he always goes for the cheaper item. Unfortunately waitress is not very good at math, and obviously she needs your help!

INPUT

You are given (T ≤ 100) tests on the first line. Each test starts with a line containing the integers N, M, K, where (2 ≤ N ≤ 1000) is the number of items on the menu, (1 ≤ MN) is the number of cakes on the menu and (1 ≤ KN) is the number of drinks on the menu. Next line contains exactly N positive integers, where the first M integers specify the prices for cakes, next K integers (0 ≤ Pi ≤ 109) specify drink prices, and the following prices are for all other items on the menu.

OUTPUT

For each test case you have to output a line "Case #T: A B". Where T is the test case number, A specifies the closest price of the cake to the average of all items, and B is the closest price of the drink to the average of all items. Refer sample output for details.

SAMPLE INPUT

2
4 1 1
1 2 3 4
5 1 2
500000000 5 6 1000000000 1000000000

SAMPLE OUTPUT

Case #1: 1 2
Case #2: 500000000 6

Problem by: Aleksej Viktorchik; Leonid Sislo
Huge Easy Contest #2