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.
The first line contains the number of data sets $K$. Each data set has the following form:
Y if the house is in foreclosure or N if it is not.No house lies exactly on the boundary of a borough, and every borough contains at least one house.
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.