Let $ABCD$ be a cyclic quadrilateral with $AB=4$, $BC=5$, $CD=6$, and $DA=7$. Let $A_1$ and $C_1$ be the feet of the perpendiculars from $A$ and $C$, respectively, to line $BD$, and let $B_1$ and $D_1$ be the feet of the perpendiculars from $B$ and $D$, respectively, to line $AC$. The perimeter of $A_1B_1C_1D_1$ is $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.