Let $ABC$ be a triangle and $E$ and $F$ two arbitrary points on sides $AB$ and $AC$, respectively. The circumcircle of triangle $AEF$ meets the circumcircle of triangle $ABC$ again at point $M$. The point $D$ is such that $EF$ bisects the segment $MD$ . Finally, $O$ is the circumcenter of triangle $ABC$. Prove that $D$ lies on line $BC$ if and only if $O$ lies on the circumcircle of triangle $AEF$.