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 2-nd, 3-rd and 4-th lines respectively. Coordinates must be real numbers with not more than 8 digits after decimal point and must not exceed 108 by absolute value. Your triangle must have non-zero 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
[submit]
[forum]

Author:Vladimir Yakovlev
Resource:Ural State University training
Date:September, 2003











Server time: 2017-09-24 12:42:39Online Contester Team © 2002 - 2016. All rights reserved.