eolymp
bolt
Try our new interface for solving problems
Problems

Boris, You Are Wrong!

Boris, You Are Wrong!

Recently Boris has invented a new triangle congruence criteria. \includegraphics{https://static.e-olymp.com/content/40/40a6a4e077d4002d835310cd7f70c4cde03c1fde.jpg} \includegraphics{https://static.e-olymp.com/content/40/40a6a4e077d4002d835310cd7f70c4cde03c1fde.jpg} \textit{\textbf{Theorem.}} Triangles \textbf{A_1B_1C_1} and \textbf{A_2B_2C_2} 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: \begin{itemize} \item \textbf{A_1B_1 = A_2B_2}, \item \textbf{B_1C_1 = B_2C_2}, \item \includegraphics{https://static.e-olymp.com/content/1a/1ac6a4f3bed1a3b284a716e01a3aaba773b7ff02.jpg} \textbf{B_1A_1C_1} = \includegraphics{https://static.e-olymp.com/content/1a/1ac6a4f3bed1a3b284a716e01a3aaba773b7ff02.jpg} \textbf{B_2A_2C_2}. \end{itemize} \includegraphics{https://static.e-olymp.com/content/40/40a6a4e077d4002d835310cd7f70c4cde03c1fde.jpg} \includegraphics{https://static.e-olymp.com/content/40/40a6a4e077d4002d835310cd7f70c4cde03c1fde.jpg} Show Boris that he is wrong. Given a triangle \textbf{A_1B_1C_1}, construct a triangle \textbf{A_2B_2C_2} that is congruent to the given triangle according to Boris's theorem, but in fact the triangles are incongruent. \InputFile \includegraphics{https://static.e-olymp.com/content/40/40a6a4e077d4002d835310cd7f70c4cde03c1fde.jpg} You are given the coordinates of the points \textbf{A_1}, \textbf{B_1} and \textbf{C_1} in three lines. All the numbers are integers and their modules do not exceed \textbf{100}. The triangle \textbf{A_1B_1C_1} is nondegenerate. \OutputFile \includegraphics{https://static.e-olymp.com/content/40/40a6a4e077d4002d835310cd7f70c4cde03c1fde.jpg} Output \textbf{YES} in the first line if the theorem works for this triangle. Otherwise, if there exists a triangle \textbf{A_2B_2C_\{2 \}}congruent to the given one according to the theorem but actually incongruent, output \textbf{NO} in the first line and in the following three lines give the coordinates of \textbf{A_2}, \textbf{B_2} and \textbf{C_2} with the maximal possible accuracy. The absolute values of the coordinates should not exceed \textbf{1000} and the triangle should be nondegenerate.
Time limit 1 second
Memory limit 64 MiB
Input example #1
0 0
-1 4
4 0
Output example #1
YES
Author Alexander Ipatov
Source The 13th Urals Collegiate Programing Championship, April 04, 2009