414. Orthogonal Circles
Time limit per test: 0.5
second(s)
Memory limit: 262144
kilobytes
input: standard
output: standard
Two circles are
orthogonal, if they intersect and for any point of intersection their tangent lines at that point are perpendicular.
Consider a set of
n circles on the plane. You are to find a circle orthogonal to all of them.
Input
The input file contains an integer
n (1 ≤
n ≤ 10
^{5}), followed by
n triples of integers:
x_{i},
y_{i},
r_{i}, denoting the center coordinates and the radii of the circles (10
^{6} ≤
x_{i},
y_{i} ≤ 10
^{6}, 1 ≤
r_{i} ≤ 10
^{6}).
The circles may coincide.
Output
If there exists exactly one circle orthogonal to all the given ones, output its center coordinates and radius as real numbers separated with single spaces. The numbers will be considered correct if they are within 10
^{6} relative or absolute error of the exact answers.
In case there's no such circle, output 1. In case there are many, output 2.
Example(s)
sample input

sample output

3
0 0 5
7 16 10
10 0 5

5.0 5.0 5.0

The example is illustrated by the following picture: