Find the unknown frequency if 24 is the median of the following frequency distribution:\[\begin{array}{|c|c|c|c|c|c|} \hline \text{Class-interval} & 0-10 & 10-20 & 20-30 & 30-40 & 40-50 \\ \hline \text{Frequency} & 5 & 25 & 25 & \text{$p$} & 7 \\ \hline \end{array}\]
If $10 \sin^4 \theta + 15 \cos^4 \theta = 6$, then the value of $\frac{27 \csc^6 \theta + 8 \sec^6 \theta}{16 \sec^8 \theta}$ is: