G

Camera in the Museum

Input: Standard Input

Output: Standard Output

 

The Catenari Museum is world renowned for the valuable antique items it has. The total market value of all its items is around 20 trillion dollars and so guarding them is a very difficult job as antique buyers and businessmen are willing to pay any amount to get hold of them. So the Museum authority does not depend on human guards any more. They have placed many CCTV cameras in the Museum. Now they want to place one high powered, fast revolving CCTV camera at one position of the ceiling. As this type of camera is very costly, so they have decided to install only one such camera per floor. 

 

All floors in the Museum are rectangular shaped and so it is possible to place the camera in a place from where all the valuables items on display can be seen. But there is a problem in the ground floor which also consists of the Head Office of the Museum. The head office has a circular shape and is somewhere strictly within the rectangular room. So it is possible that there are places in the floor from where all the valuable items are not visible. Your job is to find a place from where maximum number of items is visible and report this maximum number of valuable items. You can assume that the museum is so large compared to the valuable items that each valuable items can be denoted by a point in the 2 dimensional Cartesian coordinate system.

 

Figure: This denotes the first sample input. From location A six items are visible. But from location B less items are visible.

 

 

Input

The input file can contain up to 225 cases. But most of the cases are not extreme. The description of each test case is given below:

 

Each test case starts with six integers H, W (50 ≤  H, W ≤ 10000), R (0< 2R <10000, Cx, Cy, N. Here H and W denote the length and width of the room respectively, R denotes the radius of the circle that denotes Museum office, and (Cx, Cy) denotes the coordinate of the center of the circle. The circle is strictly within the rectangular room. You can also assume that walls of the museum are axis-parallel and the coordinate of the lower left corner of the room is at the origin (0, 0). So the coordinate of the upper right corner is (W, H). Each of the next N lines contains two integers which denote the coordinate of one valuable items of the museum. You can safely assume that no two items will be on the same coordinate, all items will be strictly inside the room but no items will be inside the Museum office or even on the boundary of office or room. 

 

Input is terminated by a line containing six zeroes. The size of the input file is less than 5 Megabyte.

 

Output

For each line of input produce one line of output. This line contains the serial of output followed by an integer T which denotes the maximum number of valuable items that is visible from at least one point in the museum room. So if the coordinate of the point is (s, t) it must satisfy (0 ≤ s ≤ W and 0 ≤ t ≤ W). You don’t need to print the coordinate of the place from where maximum number of items is visible because there may be more than one such place. Look at the output for sample input for details. You can assume that small precision errors will not affect the result. Use double-precision floating-point numbers for calculation.

 

Sample Input                               Output for Sample Input

75 91 20 60 47 6

39 10

48 18

72 21

82 33

18 36

31 52

0 0 0 0 0 0

 

Case 1: 6

 


  Problemsetter: Shahriar Manzoor, Special Thanks: Derek Kisman