You are given two convex polygons, where the larger polygon has vertices and the smaller polygon has
vertices. All the vertices of the smaller polygon locate strictly inside the larger polygon, thus the smaller polygon fully locates strictly inside the larger polygon.
The first line contains two integers
and
![]()
.
The followinglines describe the vertices on the larger convex polygon, each of which contains two integers
and
![]()
, indicating the coordinates of a vertex on the polygon. All these n vertices are given in counter-clockwise order and any three of them are not collinear.
Then the followinglines describe the vertices on the smaller convex polygon, each of which contains two integers
and
![]()
, indicating the coordinates of a vertex on the polygon. All these m vertices are also given in counter-clockwise order and any three of them are not collinear.
It is guaranteed that all the vertices of the smaller polygon locate strictly inside the larger polygon.
Output the expected length of the illuminated boundaries of the smaller polygon when JB chooses where to install the illuminant uniformly at random on the interior boundaries of the larger polygon.
Your answer is acceptable if its absolute or relative error does not exceed. Formally speaking, suppose that your output is
and the jury's answer is
, your output is accepted if and only if
.