In the US, many people lack health insurance, which causes several kinds of problems. Most doctors will not treat patients without insurance, so those patients find it hard to get medical care. Emergency rooms, however, must treat every patient, because in their originally intended role they can be the difference between life and death. As a result, since the emergency room is the only place that must accept uninsured patients, uninsured people go there even for non-life-threatening conditions such as the flu or measles. Because the emergency room has to handle life-and-death cases first, these patients are not treated right away, and people carrying infectious diseases end up waiting together for many hours in a crowded emergency room. It is not clear that this is the best way to stop such diseases from spreading. In this problem we simulate how a disease spreads among the visitors of an emergency room.
The emergency room has $S$ seats, whose coordinates are given. You are given every arrival and departure of patients over time. When a patient arrives, they take the lowest-numbered seat that is free at that moment and stay in it until they leave. The same patient may come back later, and will then pick a new seat.
Initially, only patient 1 has the disease. The disease is transmitted from patient $A$ to patient $B$ when they sit within a distance of 2 metres of each other for at least 20 consecutive minutes (for example, from time 5 until time 25 is enough, but from time 5 until time 24 is not). If either of them leaves, the shared time is counted again from 0 (sitting next to each other twice for 10 minutes each does not count).
Once a patient is infected, they begin to transmit the disease the next day, that is, 1440 minutes after the moment of infection, and stay infectious forever afterward. Patient 1 is treated as having been infected the previous day, so patient 1 is infectious from time 0. Determine how many patients have the disease when the whole process ends.
The first line contains the number $K$ of data sets. It is followed by $K$ data sets, each in the following form.
The first line of a data set contains three integers $P, S, V$. $1 \le P \le 1000$ is the number of patients (only patient 1 is infected at the start), $1 \le S \le 100$ is the number of seats in the emergency room, and $1 \le V \le 100000$ is the number of patient visits.
This is followed by $S$ lines, each containing two real numbers $x_i, y_i$, the coordinates (in metres) of the $i$-th seat. Then come $V$ lines, each containing three integers $p_j, a_j, d_j$: $p_j$ is the patient making the $j$-th visit, $a_j$ is the arrival time (in minutes, from time 0), and $d_j > a_j$ is the departure time. The visits are sorted by non-decreasing arrival time. The input guarantees that at no moment are there more than $S$ patients in the emergency room at the same time. Also, if a patient $i$ arrives at exactly the departure time of another patient $j$, then $j$ is considered to have already vacated the seat, so patient $i$ may sit there.
For each data set, print "Data Set x:" on its own line, where $x$ is the number of the data set. Then, on the next line, print the total number of patients who are sick when the process ends. Print one blank line between two consecutive data sets.