406006: GYM102215 L Inscribed Circle

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

L. Inscribed Circletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are given two circles on a plane. It is guaranteed that their circumferences have exactly two common points.

The result of the intersection of two circles is a figure with the positive area consisting of points belonging to both circles.

You have to inscribe a circle of the maximal possible radius into this figure. Output the coordinates of its center and its radius.

Input

The first line contains three integers $$$x_{1}$$$, $$$y_{1}$$$, $$$r_{1}$$$ ($$$-1000 \le x_{1}, y_{1} \le 1000, 1 \le r_{1} \le 1000$$$) — coordinates of the center of the first circle and its radius.

The second line contains three integers $$$x_{2}$$$, $$$y_{2}$$$, $$$r_{2}$$$ ($$$-1000 \le x_{2}, y_{2} \le 1000, 1 \le r_{2} \le 1000$$$) — coordinates of the center of the second circle and its radius.

Output

Output three real numbers $$$x$$$, $$$y$$$, $$$r$$$ — coordinates of the center and radius of the resulting circle. Each of the printed numbers should have absolute or relative error not exceeding $$$10^{-9}$$$.

ExamplesInput
0 0 5
6 0 5
Output
3.000000000000000 0.000000000000000 2.000000000000000
Input
-12 34 56
78 -90 123
Output
13.322257821855908 -0.888444110112585 12.890601098820779

加入题单

算法标签: