ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1659. Regular Triangles

Time limit: 1.0 second
Memory limit: 64 MB
A regular triangle is given in the plane by the coordinates of its vertices. Add to the set of these vertices 6 other points so that there are at least 9 regular triangles (including the given one) with vertices at these 9 points. Three of the new points must lie strictly inside the triangle, and the remaining three must lie strictly outside.

Input

The three input lines contain the coordinates of the vertices of the given triangle. Their absolute values do not exceed 100. The sides of the triangle are no shorter than 10.

Output

In the first three lines output the coordinates of the points put inside the triangle. In the following three lines output the coordinates of the points put outside the triangle. The distance between any of the 9 points must be at least 1. The distance between any new point and given triangle sides must be at least 0.1. Two sides are considered equal if their lengths differ by at most 10−6.

Sample

inputoutput
0 30
-25.9807621135 -15
25.9807621135 -15
0.0000000000 20.0000000000
-17.3205080757 -10.0000000000
17.3205080757 -10.0000000000
0.0000000000 40.0000000000
-34.6410161514 -20.0000000000
34.6410161514 -20.0000000000

Notes

The answer in the sample is incorrect. One can construct only 3 triangles using the given 9 points.
Problem Author: Vladimir Yakovlev
Problem Source: NEERC 2008, Eastern subregion quarterfinals