Let $S$ be the set of sides and diagonals of a regular pentagon. A pair of elements of $S$ are selected at random without replacement. What is the probability that the two chosen segments have the same length?

$\textbf{(A)}\ \frac{2}5\qquad\textbf{(B)}\ \frac{4}9\qquad\textbf{(C)}\ \frac{1}2\qquad\textbf{(D)}\ \frac{5}9\qquad\textbf{(E)}\ \frac{4}5$