In a convex quadrilateral $A B C D$, the diagonals $A C$ and $B D$ are equal to $a$ and $b$ respectively. Points $E, F, G$ and $H$ are the midpoints of sides $A B, B C, C D$ and $D A$ respectively. The area of quadrilateral $E F G H$ is $S$. Find the diagonals $E G$ and $H F$ of quadrilateral $E F G H$.
The midpoints of the sides of any quadrilateral are the vertices of a parallelogram.

## Answer

$\frac{1}{2} \sqrt{a^{2}+b^{2} \pm 2 \sqrt{a^{2} b^{2}-16 S^{2}}}$