Foreclosure Borough

No attempts yetTime limit1sMemory limit128 MB

Problem

You are given the locations of houses and, for each house, whether it is currently in foreclosure. You are also given several boroughs (areas), each described by a simple (non-self-intersecting) polygon. Different boroughs may overlap, so a single house can belong to more than one borough.

For every borough, compute its foreclosure rate: the percentage of the houses located inside that borough that are in foreclosure. Then report the boroughs sorted by this rate.

Input

The first line contains the number of data sets $K$. Each data set has the following form:

  • The first line contains two integers $H$ and $B$: the number of houses ($1 \le H \le 1000$) and the number of boroughs ($1 \le B \le 100$).
  • Each of the next $H$ lines describes one house: its $x$ and $y$ coordinates (floating-point numbers) followed by a single character, Y if the house is in foreclosure or N if it is not.
  • Each of the next $B$ lines describes one borough. The line begins with an integer $c \ge 3$, the number of polygon corners, followed by $2c$ floating-point numbers $x_1\ y_1\ x_2\ y_2\ \dots\ x_c\ y_c$ giving the corners in counter-clockwise order.

No house lies exactly on the boundary of a borough, and every borough contains at least one house.

Output

For each data set, first print a line Data Set x:, where $x$ is the 1-based index of the data set. Then print one line for each of the $B$ boroughs.

Each borough line has the form b: r%, where $b$ is the borough number (its 1-based position in the input) and $r$ is its foreclosure rate as a percentage, rounded to exactly two decimal places (round half up).

Sort the borough lines by non-increasing foreclosure rate; break ties by the smaller borough number. Print an empty line between consecutive data sets.