Problem

Source: Mediterranean math competition 2018

Tags: geometry, circumcircle, Ugly



Let $ABC$ be acute triangle. Let $E$ and $F$ be points on $BC$, such that angles $BAE$ and $FAC$ are equal. Lines $AE$ and $AF$ intersect cirumcircle of $ABC$ at points $M$ and $N$. On rays $AB$ and $AC$ we have points $P$ and $R$, such that angle $PEA$ is equal to angle $B$ and angle $AER$ is equal to angle $C$. Let $L$ be intersection of $AE$ and $PR$ and $D$ be intersection of $BC$ and $LN$. Prove that $$\frac{1}{|MN|}+\frac{1}{|EF|}=\frac{1}{|ED|}.$$