시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB0000.000%

문제

Mirko and Slavko like to eat burek for breakfast. This one time they bought one with cheese and another with meat. Watching the hot bureks on the table, teasing their nostrils with enticing aromas, they could not decide on who would get which burek so they decided to split both of them in halves. Mirko boasted that he could cut both bureks in two halves of equal areas with just one swift stroke of his knife. Help Mirko accomplish this before the bureks get cold.

Image corresponds to first example.

Each of the bureks is a convex polygon. The bureks are positioned so that one of them is completely left of the y-axis, and the other completely right of it.

Write a program that, given the coordinated of the polygons, calculates the equation of the line that splits both bureks into two halves of equal areas.

입력

The first line contains an integer N (3 ≤ N ≤ 5000), the number of vertices in the first burek.

Each of the following N lines contains two real numbers X and Y in decimal format (−1000 < X < 0, −1000 < Y < 1000), the coordinates of one vertex in the burek.

The remainder of the input describes the second burek in the same format.

In both bureks, the vertices will be given in counter-clockwise order. The coordinates of the vertices will be given with exactly three digits after the decimal point. No three points in a polygon will be collinear.

출력

Output two numbers A and B so that y = A ⋅ x + B describes a line for Mirko to use to cut the bureks. Your output must be accurate to ±0.001.

Note: the solution always exists and is unique.

예제 입력 1

3
-6.000 1.000
-2.000 2.000
-5.000 6.000
5
1.000 -1.000
3.000 -2.000
6.000 0.000
4.000 3.000
1.000 2.000

예제 출력 1

-0.319961 1.556489

예제 입력 2

4
-5.000 -1.000
-3.000 -1.000
-3.000 6.000
-5.000 6.000
4
3.222 2.000
5.000 1.000
5.000 4.000
3.222 3.000

예제 출력 2

0.000000 2.500000