Let $ABCDE$ be a pentagon inscribed in a circle such that $AB = CD = 3$, $BC = DE = 10$, and $AE= 14$.  The sum of the lengths of all diagonals of $ABCDE$ is equal to $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers.  What is $m+n$ ?
$\textbf{(A) }129\qquad \textbf{(B) }247\qquad \textbf{(C) }353\qquad \textbf{(D) }391\qquad \textbf{(E) }421\qquad$
Let $BE=a$, $AD=b$, and $AC=CE=BD=c$. Let $F$ be on $AE$ such that $CF \perp AE$. 

In $\triangle CFE$ we have $\cos\theta = -\cos(\pi-\theta)=-7/c$. We use the [Law of Cosines](https://artofproblemsolving.com/wiki/index.php/Law_of_Cosines) on $\triangle ABC$ to get $60\cos\theta = 109-c^2$.  Eliminating $\cos\theta$ we get $c^3-109c-420=0$ which factorizes as 
\[(c+7)(c+5)(c-12)=0.\]Discarding the negative roots we have $c=12$. Thus $BD=AC=CE=12$. For $BE=a$, we use Ptolemy's theorem on cyclic quadrilateral $ABCE$ to get $a=44/3$. For $AD=b$, we use [Ptolemy's theorem](https://artofproblemsolving.com/wiki/index.php/Ptolemy%27s_theorem) on cyclic quadrilateral $ACDE$ to get $b=27/2$.
The sum of the lengths of the diagonals is $12+12+12+\tfrac{44}{3}+\tfrac{27}{2} = \tfrac{385}{6}$ so the answer is $385 + 6 = \fbox{\textbf{(D) }391}$