Geometry
Geometry-04
Geometry-05
Geometry-06
~/algor $ cat problems/parallelogramm-uchi
Fourth vertex of a parallelogram
Easy
1000 ms
128 MB
29%
Three vertices of a parallelogram $ABCD$ are given: $A(x_{1}; y_{1})$, $B(x_{2}; y_{2})$ and $C(x_{3}; y_{3})$ (the vertices go around in the order $A, B, C, D$). Find the coordinates of the fourth vertex $D$.
Input
One line with six integers: $x_{1}$, $y_{1}$, $x_{2}$, $y_{2}$, $x_{3}$ and $y_{3}$.
Output
Two space-separated integers — the coordinates of point $D$.
Note
$-10^{9} \le x_{i}, y_{i} \le 10^{9}$
$A$, $B$ and $C$ do not lie on one line.
Examples
Input #1
1 1 4 2 5 5
Output #1
2 4
Input #2
0 0 -3 0 -3 -2
Output #2
0 -2