You have a powerful laser gun and you can destroy obstacles with it. The laser coming out of the gun keeps going even after destroying the obstacles.
Now, you have exactly one laser shot left and you want to destroy the maximum number of obstacles. The obstacles are scattered, and for this problem assume that the obstacles have 2D Cartesian coordinates. You can move to any point as you want (not necessarily to integer coordinates), shoot at any angle, but you can fire exactly one shot. Your target is to find the maximum number of obstacles you can destroy in this shot.
In the right picture, the obstacles are denoted by 2D points (1, 1), (2, 2), (2, 9), (3, 10), (10, 17)
and the red line denotes the best possible laser shot that destroys 3 obstacles.
Input
Input starts with an integer T (≤ 30), denoting the number of test cases.
Each case starts with a line containing an integer n (1 ≤ n ≤ 700) denoting the number of points. Each of the next n lines contains two integers x y (-10000 ≤ x, y ≤ 10000) denoting the coordinate of an obstacle. You can assume that the coordinates of all the obstacles are distinct.
Output
For each case, print the case number and the maximum number of obstacles you can destroy in one laser shot.
Sample
Sample Input | Sample Output |
---|---|
2 5 1 1 2 2 2 9 3 10 10 17 3 5 6 6 7 2 8 | Case 1: 3 Case 2: 2 |