uses
	testlib, math, sysutils;

const
	EPS = 1e-4;

var
	x11, y11, x12, y12, x21, y21, x22, y22, x, y, r, d11, d12, d21, d22: extended;

begin
	x11 := inf.readreal;
	y11 := inf.readreal;
	x12 := inf.readreal;
	y12 := inf.readreal;
	x21 := inf.readreal;
	y21 := inf.readreal;
	x22 := inf.readreal;
	y22 := inf.readreal;

	x := ouf.readreal;
	y := ouf.readreal;
	r := ouf.readreal;

	if (abs(x) > 1e12) or (abs(y) > 1e12) then
		quit(_wa, 'invalid coordinates, too big');

   	if (r < 1e-4) or (r > 1e12) then
		quit(_wa, 'invalid radius');

	d11 := hypot(x11 - x, y11 - y);
	d12 := hypot(x12 - x, y12 - y);
	d21 := hypot(x21 - x, y21 - y);
	d22 := hypot(x22 - x, y22 - y);

	if not( ((d11 < r - EPS) and (d12 > r + EPS)) or ((d11 > r + EPS) and (d12 < r - EPS)) ) then
		quit(_wa, 'the first segment is not correctly intersected');
	if not( ((d21 < r - EPS) and (d22 > r + EPS)) or ((d21 > r + EPS) and (d22 < r - EPS)) ) then
		quit(_wa, 'the second segment is not correctly intersected');

   	quit(_ok, format('%.10f %.10f %.10f', [x, y, r]));
end.