Optimal Space Way
It is 2180 AD, the human race has just started to abandon the earth and spread the civilization in space. ACM (Association for Cosmic Machinism) is in charge of this whole relocation process and this process is funded mostly by IBM (Inter-planet Ballistic Machines). Thousands of space cities are built in the outer space and to maintain universal business hour (Sunrises and sets at the same time in all space cities) they are built on the same imaginary plane. So the location of the cities can be expressed as two-dimensional Cartesian coordinates.
The cities are located far away from one another and the only way of going from one city to another is by using shuttle rockets. But from previous experience ACM knows that traveling by roads is a lot cheaper than traveling by rockets. So they have decided to build some roads. But building roads between every pair of cities is very expensive. So they are planning to build a super space-way (SSW) that will be a straight road. When someone needs to travel from a city c_1 to city c_2, he first travels from c_1 to the nearest point of SSW with a rocket, and moves along the SSW to the point, which is nearest to c_2. Then from there he goes to c_2 using another rocket. The cost of moving along the road is proportional to the distance but cost of flying on rockets is proportional to the square of the distance. So you have to build the SSW in such a position so that total cost of traveling in a calendar year by rockets is minimized. You can assume that:
The cities are so small compared to the distance between them that they can be considered as points on a two dimensional Cartesian coordinate system.
The SSW is so narrow compared to the distance between the cities that it can be considered as a straight line. The length of the SSW can be increased indefinitely in both directions if total cost of traveling by rocket decreases by doing so.
For simplicity you can assume that total number of incoming and outgoing rockets from each city is the same.
Sometimes exactly one city can be marked as the super city, which is the center of all activities. In that case the total of incoming and outgoing flights of that city is M times higher than an ordinary city.
Assume that all rockets travel in straight line.
Given the location of all the cities, you will have to find a location for the SSW for which the total cost of traveling by rockets is minimum. And you have to produce the minimum average cost per rocket flight assuming that cost of flying vunit distance is v^2.
Input
The input file contains less than 50 test cases. The description of each test case is given below:
Each test case starts with two integers N (0 < N ≤ 10000) and Q (0 < Q ≤ 100). Here N is the total number cities built in outer space and Q is the total number of query. Each of the next N lines contains two floating-point numbers,x_i, y_i (0.0 ≤ x_i, y_i ≤ 1000.0) which denotes the coordinate of the i-th city. Cities are numbered from 0 to N-1 in the order they appear in the input file. Each of the next Q lines contains two integers S (0 ≤ S ≤ N-1) and M (1 < M ≤10000). Here S denotes the id of the super city and M denotes that its total number of incoming and outgoing flights in the super city is M times higher than an ordinary city.
A line containing two zeroes terminates the input. This line should not be processed.
Output
For each test case produce Q+2 lines of output. The first line contains the case number followed by a colon. The second line contains a floating-point number which denotes the minimum average cost per rocket flight for the optimal super space way (Assuming all cities are ordinary). This line is followed by Q lines, one line for each query. This line contains the serial of query followed by a floating-point number. This number denotes the minimum average cost for the optimal super space way assuming that S-th city is a super city and all other cities are ordinary. All floating-point numbers in the output should have five digits after the decimal point. Look at the output for sample input for details. You can assume that for all floating-point outputs an absolute error less than 10^{-5} will be ignored.