244. Height, Bisector and Median
time limit per test: 0.25
sec.
memory limit per test: 4096
KB
input: standard
output: standard
There is a triangle ABC. You are given lengths of its height, bisector and median. Your task is to construct this triangle, i.e. to find such points A, B and C, that triangle ABC will have height AH, bisector AD and median AM with lengths equal to given. Of course, if there is one solution, then there is an infinite number of solutions, so you may find any of them.
Input
Three integer numbers will be at the first line of file: AH, AD, AM. All numbers are positive and not exceed 100.
Output
In the first line write "YES", if such triangle could be constructed, and "NO" otherwise. In case of positive answer write coordinates of points A, B and C on the 2nd, 3rd and 4th lines respectively. Coordinates must be real numbers with not more than 8 digits after decimal point and must not exceed 10^{8} by absolute value. Your triangle must have nonzero area and the lengths of its height AH, bisector AD and median AM must not differ from given more than 10^{6}.
Sample test(s)
Input
Test #1
1 1 1
Test #2
1 1 2
Output
Test #1
YES
0 1
0.5 0
0.5 0
Test #2
NO
Author:  Vladimir Yakovlev

Resource:  Ural State University training

Date:  September, 2003

Server time: 20171123 19:43:14  Online Contester Team © 2002  2016. All rights reserved. 

