Air Strike

No attempts yetTime limit1sMemory limit128 MB

Problem

General Gee commands a military base and has learned that the enemy is about to launch an air missile strike. The base is protected by two magnetic towers. When a tower is powered, it produces a horizontal magnetic disk (a circle centered at the tower), and any missile that lands inside that disk, or exactly on its boundary, is deflected and does no harm.

The area of a disk is proportional to the energy the tower receives; a disk of radius $r$ has area $\pi r^2$. The power plants supply a fixed total energy $T$, which must be split between the two towers, so the combined area of the two disks may not exceed $T$:

$$\pi r_1^2 + \pi r_2^2 \le T$$

where $r_1$ and $r_2$ are the radii chosen for the two towers.

Given the landing coordinates of every incoming missile, choose $r_1, r_2 \ge 0$ (subject to the energy budget) to minimize the number of missiles that are not deflected and therefore hit the base.

You may assume:

  • The two towers have different heights, so their magnetic disks never interfere with each other.
  • A missile is deflected if it passes through a tower's disk or merely touches its boundary (its distance to the tower is at most that tower's radius).
  • A missile landing exactly on a tower's location is deflected even if that tower receives no energy.
  • All missiles land at the same instant, so energy cannot be redistributed between the towers during the strike.
  • Use $\pi = 3.141$.

Input

The input contains several test cases. Each test case is given on $N + 2$ lines:

  • The first line contains an integer $N$ $(1 \le N \le 1000)$, the number of missiles.
  • The second line contains five real numbers $X_1$, $Y_1$, $X_2$, $Y_2$, $T$: $(X_1, Y_1)$ and $(X_2, Y_2)$ are the coordinates of the two towers, and $T$ $(0 \le T)$ is the total energy, i.e. the maximum combined area of the two disks.
  • Each of the next $N$ lines contains two real numbers: the landing coordinates of one missile.

Every real number has absolute value at most $100$ and at most $3$ digits after the decimal point. Numbers on the same line are separated by one or more whitespace characters, and zero or more blank lines may appear between test cases.

The input ends with a line containing a single $0$.

Output

For each test case, print one line in the form:

k. M

where $k$ is the test case number (starting from $1$) and $M$ is the minimum number of missiles that are not deflected under the best distribution of energy between the two towers.