Playground Organization#3365

Playground Organization

1 second
64 megabytes
Very hard

You are organizing a fun playground event! The playground has a triangular shape, and there are children who want to participate. You want to divide the playground into activity zones so that each zone has exactly children.

The playground is triangular, and you need to find a special point inside it. From this point, you will create zones by drawing lines to the three corners of the playground. This way, the playground will be divided into smaller triangles. Can you find such a point so that each zone has exactly children?

Input

Consists of multiple test cases. Each test case is formatted as follows:

  • Line : An integer (3 \le n \le 30000) denoting the number of children, is always a multiple of .

  • Lines to : Two numbers x_i and y_i (-10 \le x_i, y_i \le 10) denoting the coordinates of the -th corner of the playground. The three corners are specified in counterclockwise order.

  • Lines to n + 4: Two numbers x_i and y_i (-10 \le x_i, y_i \le 10) denoting the coordinates of the -th child. All children are in the interior of the playground triangle.

Input is followed by a single line with a , which should not be processed.

It is guaranteed that no two children will be collinear with any of the corners of the playground. In particular, it is guaranteed that for any two children and and any corner the angle will be at least 10^{-7} rad.

Output

For each test case, print out a single line with two numbers and denoting the dividing point of the playground. Each child must lie in the interior of one of the three generated triangles. Consider each child as a point with zero radius and the dividing line as a straight line with zero thickness. It is guaranteed that there exists a dividing point; in fact, it is guaranteed that there exists a dividing point such that if the point were moved by 10^{-7} in any direction, it would still be a dividing point. Any dividing point that partitions the children into sets of equal size will be judged correct.

Examples

Example 1

Loading
Loading