402656: GYM100834 E Polycarp and Arcolygon
Description
Polycarp has got a plane with N circles on it and an infinitely long thread. Each circle i is discribed using the centerpoint coordinates xi and yi and the radius ri. Polycarp uses the thread to swift all the circles so that all of them are inside the figure, formed by the thread. However, the thread can not be cut.
Polycarp is eager to know what the shortest length the tread should be to be able to swift the circles and what area the resulting figure will have.
InputThe first line contains the only integer N, 2 ≤ N ≤ 100.
Next N lines contain integer triplet xi, yi, ri. The numbers are separated by whitespaces, - 1000 ≤ xi, yi ≤ 1000, 1 ≤ ri ≤ 100. It is insured that the circles do not intersect and contact with each other.
OutputOutput two numbers — thread length and figure area. You may assume that answers is coparated with the precision of 10 - 6.
ExamplesInput2Output
0 0 1
99 99 100
670.80969437 33561.73030009Input
2Output
10 0 4
-10 0 4
65.13274123 210.26548246Input
5Output
0 100 10
-100 -20 10
100 -20 10
-50 40 10
50 40 10
575.24184011 17438.25913572