Attack of the Giant n-pus

No attempts yetTime limit1sMemory limit128 MB

Problem

A pirate ship is under attack by a giant n-pus — a creature like an octopus, but with $n$ tentacles. Its $n$ tentacles and its head have punched through the deck and are tearing the ship apart. To stop it, the captain charges at the head, but a tentacle instantly knocks him back: he cannot reach the head while the tentacles can move freely.

The captain is not alone. There are $p$ pirates ($p \ge n$) scattered across the deck, ready to follow his orders. His plan: send one pirate to pin down each tentacle. The captain will start moving toward the head only once every tentacle is being held by a pirate, and the instant he reaches the head the creature dies.

Each pirate and the captain travel in a straight line to their target at their own constant speed, unobstructed by anyone or anything. A tentacle counts as pinned the moment its assigned pirate reaches it, and the captain may start moving as soon as the last tentacle is pinned.

Assign the pirates to the tentacles so the captain kills the n-pus as early as possible, and report that earliest time.

Input

The first line contains a single integer $T$: the number of test cases. Each test case has the following format:

  • One line with two integers $n$ and $p$ ($1 \le n \le p \le 100$): the number of tentacles and the number of pirates (not counting the captain).
  • One line with three integers $x_c$, $y_c$ and $v_c$: the captain's coordinates and speed.
  • $p$ lines, each with three integers $x_i$, $y_i$ and $v_i$: the coordinates and speed of one pirate.
  • One line with two integers $x_h$ and $y_h$: the coordinates of the n-pus's head.
  • $n$ lines, each with two integers $x_j$ and $y_j$: the coordinates of one tentacle.

All coordinates satisfy $0 \le x, y \le 10000$ and all speeds satisfy $1 \le v \le 100$. The captain, the pirates, the head and the tentacles are point-like (they have no size) and their positions are all distinct. Everyone moves in a straight line toward their target at their given speed.

Output

For each test case, print on its own line the minimum time for the captain to kill the n-pus, rounded to exactly 6 digits after the decimal point (for example, 1.500000).