In the plane, you are given a polygon with sides (without self-intersections or self-tangencies) and ellipses. An ellipse in this context is defined by the inequality:

Your task is to determine the length of the polygon's boundary that is not covered by any of the ellipses.
Additionally, you are given a real number . You need to compute the minimum number of segments of length required to cover the portions of the polygon's boundary that are not covered by the ellipses.
The first line contains an integer (1 \leq n \leq 1500). The following lines each contain two integers, the coordinates of a vertex of the polygon (|x|, |y| \leq 10^6). The vertices may be given in either clockwise or counterclockwise order.
Next comes one line containing an integer (1 \leq m \leq 1500), the number of ellipses. Then follow lines; each describes an ellipse with four integers: x_c, y_c, , and (|x_c|, |y_c|, |a|, |b| \leq 10^6).
The last line contains a real number (10^{-3} \leq L \leq 10^6).
Output two lines.
The first line should contain the length of the portion of the polygon's boundary that is not covered by ellipses, with an absolute or relative error of at most 10^{-6}.
The second line should contain the minimum number of segments of length required to cover the uncovered portion.
Example 1