The scoring system for this challenge is binary. Your score is zero unless you pass all tests.
Given strictly convex simple polygons and ellipses on a plane, find any point lying in their intersection. Then print two lines of output, where the first line contains the point's coordinate and the second line contains its coordinate. The point lying on the boundary of an ellipse or polygon is considered to be an inner point.
Input Format
The first line contains an integer, , denoting the number of polygons.
The next set of lines defines polygons, where each polygon is described as follows:
- The first line contains an integer, , denoting the number of vertices in polygon .
- Each of the subsequent lines contains two space-separated integers denoting the respective and coordinates for one of polygon 's vertices. The list of vertices is given in counterclockwise order.
The next line contains an integer, , denoting the number of ellipses.
Each of the subsequent lines contains five space-separated integers denoting the respective values of , , , , and , which are the coordinates of the two focal points and the semi-major-axis for an Ellipse.
Constraints
- The coordinates of points are integers in the inclusive range .
- All semi-major-axes are integers .
- It's guaranteed that a solution exists.
- This challenge has binary scoring.
Output Format
Print two lines describing an point inside the intersection. The first line must be a real number denoting the point's coordinate, and the second line must be a real number denoting its coordinate. Your answer is considered to be correct if there is a point, , inside the intersection such that the distance between and is at most .
Sample Input
2
4
0 0
2 0
2 1
0 1
3
-1 -1
5 1
0 5
1
1 2 1 4 2
Sample Output
0.999998
1
Explanation
The intersection consists of only one point: . As its distance to is , this is a correct answer. Thus, we print the coordinate, , on the first line and the coordinate, , on the second line.