Олимпиадный тренинг

Задача 38361. Dense forest


Clearing — this is such a straight line that passes through the forest (that is, there are trees both on one side of this line and on the other), and at the same time it does not pass through any of the trees of the forest, and also does not touch the trees. We will say that the forest is dense if there is not a single clearing in it.

On the plan of the forest, all trees are depicted as circles. No two circles intersect or touch each other. According to this plan, it is required to determine whether the forest is dense.

Input
The input file contains first an integer N — number of trees (1?N?200). Then comes N triples of numbers that define the trees. The first two numbers set the coordinates of the center, and the third — radius. All data are specified exactly and expressed as real numbers with no more than 2 decimal places, modulo not exceeding 1000.

Imprint
The first line of the output file should contain the message YES if the forest is dense, and NO otherwise. In the second case, the second line of the output file must contain the coordinates of two points through which the clearing passes. All coordinates must be output with eight decimal places, coordinates must not exceed 2000, and the distance between the output points must be at least 100.
 
Examples
# Input Output
1 3
 0.00 30.00 25.00
 0.00 -30.00 25.00
 40.00 0.00 16.00
NO
-833.3333340000 -552.7707973875
 833.3333340000 552.7707973875
2 3
0.00 30.00 29.00
0.00 -30.00 29.00
40.00 0.00 19.00
YES