~/algor $ cat problems/begin-kesma-ortasi
Midpoint of a segment
Easy
1000 ms
64 MB
11%
The endpoints of a segment on the plane are given: $A(x_{1}; y_{1})$ and $B(x_{2}; y_{2})$. Find the coordinates of its midpoint $M(x_{M}; y_{M})$:
$$x_{M} = \frac{x_{1} + x_{2}}{2}, \qquad y_{M} = \frac{y_{1} + y_{2}}{2}$$
Input
One line with four integers: $x_{1}$, $y_{1}$, $x_{2}$ and $y_{2}$.
Output
One line with two numbers: $x_{M}$ and $y_{M}$, each with exactly 1 digit after the decimal point (for example, 2.0). If the rounded result is zero (for example, $-0.01$), print 0.0 (not -0.0).
Note
$-10^{4} \le x_{1}, y_{1}, x_{2}, y_{2} \le 10^{4}$
Examples
Input #1
0 0 4 2
Output #1
2.0 1.0
Input #2
-3 1 2 -4
Output #2
-0.5 -1.5