312. 4-3 King

Time limit per test: 0.25 second(s)
Memory limit: 65536 kilobytes
input: standard
output: standard



The king of the Quadroland (or was it Triland?..) has died. After four or three days of mourning, his will was declared: all his kingdom was to be divided into four or three parts, one for each son. The kingdom itself can be represented as a quadrangle or a triangle on a plane, with each side associated with one of the sons. After the division is performed, each son should get a quadrangle or a triangle, one of the sides coinciding with his associated side of the original kingdom. The required ratio between areas of their parts is given. You are to perform such a division.

Input
The first line of the input file contains the number N (3 ≤ N ≤ 4) of sons (equal to the number of sides of the kingdom).

The next N lines contain the coordinates of the vertices of the kingdom. The vertices are given in either clockwise or counter-clockwise order. No two consecutive sides of the kingdom lie on the same line. Each coordinate is an integer not exceeding 100 by its absolute value.

The last, (N+2)-th line contains the required ratio formatted like
K1:K2:...:KN
, where K1 corresponds to the side between 1st and 2nd vertices, K2 — between 2nd and 3rd vertices, etc, KN — between Nth and 1st vertices. Each Ki is an integer, 1 ≤ Ki ≤ 100.

Output
The first line of the output file should contain the description of the part corresponding to the side between 1st and 2nd vertices, the second line — between 2nd and 3rd vertices, etc.

Each description should consist of the number of vertices in the polygon (3 or 4), followed by their coordinates, in either clockwise or counter-clockwise order. Two ends of each side should be some neighbouring vertices of the corresponding polygon. The coordinates can be real numbers; if this is the case, print as many digits after the decimal point as possible.

In case the division is impossible, output -1 on the only line of output.

Example(s)
sample input
sample output
3
0 0
10 0
0 10
4:2:4
3 0 0 10 0 4 4
3 10 0 0 10 4 4
3 0 10 0 0 4 4

sample input
sample output
4
0 0
0 30
100 30
100 0
1:3:1:3
3 0 0 0 30 25.0 15.0
4 0 30 100 30 75.0 15.0 25.0 15.0
3 100 30 100 0 75.0 15.0
4 0 0 100 0 75.0 15.0 25.0 15.0