e-olymp
Competitions

WEEK5 GEOMETRY

Diagonals

Four pointsA(x1; y1), B(x2; y2), C(x3; y3), D(x4; y4)are the vertices of parallelogram. Determine the length of the diagonals and find the coordinates of their intersection.

prb942

Input

In 4-lines through the gap defined x and y coordinates of successive peaks parallelogram, respectively points A, B, C and D. All numbers in absolute value does not exceed 100.

Output

The first line print after a gap of x and y coordinates of the point O, in the second - print the length of the diagonal ACand through a gap - BD. The results lead to three decimal.

Time limit 1 second
Memory limit 64 MiB
Input example
4 6
11 6
10 2
3 2
Output example
7.000 4.000
7.211 8.944