In $\triangle ABC, AB = 360, BC = 507,$ and $CA = 780.$ Let $M$ be the [midpoint](https://artofproblemsolving.com/wiki/index.php/Midpoint) of $\overline{CA},$ and let $D$ be the point on $\overline{CA}$ such that $\overline{BD}$ bisects angle $ABC.$ Let $F$ be the point on $\overline{BC}$ such that $\overline{DF} \perp \overline{BD}.$ Suppose that $\overline{DF}$ meets $\overline{BM}$ at $E.$ The ratio $DE: EF$ can be written in the form $m/n,$ where $m$ and $n$ are relatively prime positive integers. Find $m + n.$
In the following, let the name of a point represent the mass located there. Since we are looking for a ratio, we assume that $AB=120$, $BC=169$, and $CA=260$ in order to simplify our computations.
First, reflect point $F$ over angle bisector $BD$ to a point $F'$.

[asy] size(400); pointpen = black; pathpen = black+linewidth(0.7);  pair A=(0,0),C=(7.8,0),B=IP(CR(A,3.6),CR(C,5.07)), M=(A+C)/2, Da = bisectorpoint(A,B,C), D=IP(B--B+(Da-B)*10,A--C), F=IP(D--D+10*(B-D)*dir(270),B--C), E=IP(B--M,D--F);pair Fprime=2*D-F; /* scale down by 100x */ D(MP("A",A,NW)--MP("B",B,N)--MP("C",C)--cycle); D(B--D(MP("D",D))--D(MP("F",F,NE))); D(B--D(MP("M",M)));D(A--MP("F'",Fprime,SW)--D); MP("E",E,NE); D(rightanglemark(F,D,B,4)); MP("390",(M+C)/2); MP("390",(M+C)/2); MP("360",(A+B)/2,NW); MP("507",(B+C)/2,NE); [/asy]
As $BD$ is an angle bisector of both triangles $BAC$ and $BF'F$, we know that $F'$ lies on $AB$. We can now balance triangle $BF'C$ at point $D$ using mass points.
By the [Angle Bisector Theorem](https://artofproblemsolving.com/wiki/index.php/Angle_Bisector_Theorem), we can place [mass points](https://artofproblemsolving.com/wiki/index.php/Mass_points) on $C,D,A$ of $120,\,289,\,169$ respectively. Thus, a mass of $\frac {289}{2}$ belongs at both $F$ and $F'$ because BD is a median of triangle $BF'F$ . Therefore, $CB/FB=\frac{289}{240}$.
Now, we reassign mass points to determine $FE/FD$. This setup involves $\triangle CFD$ and [transversal](https://artofproblemsolving.com/wiki/index.php/Transversal) $MEB$. For simplicity, put masses of $240$ and $289$ at $C$ and $F$ respectively. To find the mass we should put at $D$, we compute $CM/MD$. Applying the Angle Bisector Theorem again and using the fact $M$ is a midpoint of $AC$, we find
\[\frac {MD}{CM} = \frac {\frac{169}{289}\cdot 260 - 130}{130} = \frac {49}{289}\]
At this point we could find the mass at $D$ but it's unnecessary.
\[\frac {DE}{EF} = \frac {F}{D} = \frac {F}{C}\cdot\frac {C}{D} = \frac {289}{240}\cdot\frac {49}{289} = \boxed{\frac {49}{240}}\]
and the answer is $49 + 240 = \boxed{289}$.