A hexagon that is inscribed in a circle has side lengths $18$, $18$, $16$, $18$, $18$, and $16$ in that order. The radius of the circle can be written as $p+\sqrt{q}$, where $p$ and $q$ are positive integers. Find $p+q$.
Let the sides $18$ subtend $2\alpha$ and $16$ subtend $2\beta$; $4\alpha+2\beta=\pi$, so $\beta=\frac\pi2-2\alpha$ and $16=2R\cos2\alpha=2R-\frac{18^2}{R}$.