Problem

Source: Estonia IMO TST 2015 p11

Tags: circles, geometry



Let $M$ be the midpoint of the side $AB$ of a triangle $ABC$. A circle through point $C$ that has a point of tangency to the line $AB$ at point $A$ and a circle through point $C$ that has a point of tangency to the line $AB$ at point $B$ intersect the second time at point $N$. Prove that $|CM|^2 + |CN|^2 - |MN|^2 = |CA|^2 + |CB|^2 - |AB|^2$.