Problem

Source: Iran MO Third Round G3

Tags: geometry, Spiral Similarity, khi point



The point $M$ is the middle of the side $BC$ of the acute-angled triangle $ABC$ and the points $E$ and $F$ are respectively perpendicular foot of $M$ to the sides $AC$ and $AB$. The points $X$ and $Y$ lie on the plane such that $\triangle XEC\sim\triangle CEY$ and $\triangle BYF\sim\triangle XBF$(The vertices of triangles with this order are corresponded in the similarities) and the points $E$ and $F$ don't[neither] lie on the line $XY$. Prove that $XY\perp AM$.