favorite We need a little bit of your help to keep things running, click on this banner to learn more

Green spot

Green spot

prb42 Two triangular projectors form two spots on a wall, one of blue, and second of yellow colour. Find the area of a green spot that is obtained with superposition of two spots and the form (number of vertices) of a green spot.


The first line contains the coordinates of the first spot: x11, y11, x12, y12, x13, y13, and the second line contains the same vertex coordinates of the second spot x21, y21, x22, y22, x23, y23. It is know that -100 ≤ xi, yi ≤ 100.


Print 2 numbers, separated with a blank, in one line: the number of vertices in a green spot and its area with two digits after the decimal point.

Time limit 1 second
Memory limit 64 MiB
Input example #1
2 2 2 6 8 4
5 4 11 6 11 2
Output example #1
4 1.50
Author Анатолий Присяжнюк