Recently Boris has invented a new triangle congruence criteria.
Theorem.
Triangles A1B1C1 and A2B2C2 are congruent
if two sides and the angle opposite to one of them in one triangle are equal to
the corresponding sides and angle of another triangle:
- A1B1 = A2B2,
- B1C1 = B2C2,
- ∠ B1A1C1 = ∠ B2A2C2.
Show Boris that he is wrong. Given a triangle A1B1C1,
construct a triangle A2B2C2 that is congruent
to the given triangle according to Boris's theorem, but in fact the triangles
are incongruent.
Input
You are given the coordinates of the points A1, B1, and C1 in three lines.
All the numbers are integers and their modules do not exceed 100.
The triangle A1B1C1 is nondegenerate.
Output
Output “YES” in the first line if the theorem works for this
triangle. Otherwise, if there exists a triangle
A2B2C2 congruent to the given one according
to the theorem but actually incongruent, output “NO” in the first line
and in the following three lines give the coordinates of A2, B2,
and C2 with the maximal possible accuracy. The absolute values of the
coordinates should not exceed 1000 and the triangle should be nondegenerate.
Samples
input | output |
---|
0 0
-1 4
4 0
| YES
|
0 0
4 3
6 0
| NO
0.0000000000 0.0000000000
-3.0000000000 4.0000000000
0.0000000000 2.0000000000
|
Problem Author: Alexander Ipatov (prepared by Vladimir Yakovlev)
Problem Source: The 13th Urals Collegiate Programing Championship, April 04, 2009