Recently Boris has invented a new triangle congruence criteria.
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
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 “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.
Problem Author: Alexander Ipatov (prepared by Vladimir Yakovlev)
Problem Source: The 13th Urals Collegiate Programing Championship, April 04, 2009