beecrowd | 1446
# Venn Diagram?

**Timelimit: 1**

Maratona de Programacao IME-USP Brasil

Mickayil was in school studying set theory. Schools in Prague are quite severe. The teacher taught the students how to draw Venn diagrams to three sets, and asked the students to work with diagrams. To impress the teacher with nicely drawn diagrams, Mickayil decided that he would make colorful diagrams. To achieve this goal, he cut out three convex figures using thin colored papers. Mickayil realized that, by overlapping pictures, the intersections could generate new colors.

Thus, we have three convex pictures over a plain surface, each picture with a color. When pictures are overlapped, the color we see is a mixture of the pictures' colors. We can represent the colors by integers between 0 and 15. The mix of colors is done by summing the values of the corresponding colors modulo 16. We want to know what we see when looking at the Mickayil's Venn Diagram, i.e., what colors and their frequences. We will measure this by the visible area of each color.

Several instances are given. Each instance consists of three figures. These figures are given one per line, in the format

*n _{i} c_{i} x_{i1} y_{i1 }x_{i2} y_{i2} ... x_{ij }y_{ij} ... x_{in} y_{in}*

for *i* = 1, 2, 3, where 0 ≤ **n _{i }**≤ 200 is the number of points in

You should print a header indicating the number of the instance that is being treated (Instancia h) and in the following lines the color pair and the total visible area of that color. These lines should be sorted by areas, in a decreasing order. In case of draws, print the increasing order of color. In order to simplify the presentation, show the values of the areas rounded to two decimal places. You must print a blank line after each Instance.

Sample Input | Sample Output |

4 5 -1 -1 1 -1 1 1 -1 1 |
Instancia 1
Instancia 2 |