No tags yet

No tag edit access

time limit per test: 0.25 sec.

memory limit per test: 4096 KB

memory limit per test: 4096 KB

input: standard

output: 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.

Three integer numbers will be at the first line of file: |AH|, |AD|, |AM|. All numbers are positive and not exceed 100.

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 10^{8} 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}.

Input

Test #1

1 1 1

Test #2

1 1 2

1 1 1

Test #2

1 1 2

Output

Test #1

YES

0 1

-0.5 0

0.5 0

Test #2

NO

YES

0 1

-0.5 0

0.5 0

Test #2

NO

Author: | Vladimir Yakovlev |

Resource: | Ural State University training |

Date: | September, 2003 |

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/23/2019 17:25:24 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|