Cut a triangle#5954

Cut a triangle

2 seconds
256 megabytes
Hard

Given a triangle. Cut it with a straight line into two shapes so that the areas and perimeters of these two shapes are equal.

Input

Three lines of two integers each: x_i, y_i (-1000 ≤ x_i, y_i ≤ 1000) are the coordinates of the vertices of the triangle. It is guaranteed that the triangle is non-degenerate.

Output

Two lines of two real numbers are the coordinates of the two points on the border of the triangle, through which the cut should be made.

The answer will be counted if each of the two points belongs to at least one side of the triangle, and the two figures obtained by cutting have equal area and equal perimeter. It is considered that a point belongs to a segment, if the distance between them is not more than 10^{-8}. The areas and perimeters of the figures must be equal with an absolute or relative error of 10^{-8}.

Examples

Example 1

Loading
Loading