5. If prime numbers $p, q$ satisfy $p^{2}-5 q-36=0$, then the median of the sample $p, q, 9, 16$ is $(\quad$.
(A) 16
(B) 13
(C) 11
(D) 13.5
5. D.

From $p^{2}-5 q-36=0$ we get $(p+6)(p-6)=5 q=q 5=1 \times 5 q=5 q \times 1$.
$$
\left\{\begin{array} { l } 
{ p + 6 = 1 , } \\
{ p - 6 = 5 q ; }
\end{array} \left\{\begin{array}{l}
p+6=5 q, \\
p-6=1 .
\end{array}\right.\right.
$$

Solving, we get $(p, q)=(-1,-7)$ (discard), (11,17), $\left(-5,-\frac{11}{5}\right)$ (discard), $\left(7, \frac{13}{5}\right)$ (discard). Therefore, the sample is $11,17,9,16$, and the median is $\frac{11+16}{2}=13.5$.