Circle through three points#1510

Circle through three points

1 second
128 megabytes
Very easy

Three points are given on the plane that do not lie on a straight line. Find the equation of the circle passing through them. Print the solution in the following forms:

(x - a)^2 + (y - b)^2 = r^2~~~(1)

and

x^2 + y^2 + c x + d y + e = 0~~~(2)

Input

Each test case consists of a line containing six real numbers A_x, A_y, B_x, B_y, C_x, C_y — the coordinates of three points A~(A_x, A_y), B~(B_x, B_y), and C~(C_x, C_y). Numbers are separated by one or more spaces.

Output

For each test case, print the equation of the circle in the two formats shown above. The values , , , , , and in equations (1) and (2) must be printed with three decimal places. If any of , , , , or is zero, omit the corresponding term. Adjust plus and minus signs as necessary to avoid multiple signs before a number. The plus, minus, and equal signs must each be separated from adjacent characters by a single space. No other extra spaces should appear in the equations. Print a single blank line after each pair of equations. See the output format in the example.

Examples

Example 1

Loading
Loading