5. If the cosine values of the three interior angles of triangle $S$ are equal to the sine values of the three interior angles of triangle $T$, then ( ).
(A) Both $S$ and $T$ are acute triangles
(B) Both $S$ and $T$ are obtuse triangles
(C) $S$ is an acute triangle, and $T$ is an obtuse triangle
(D) $S$ is an obtuse triangle, and $T$ is an acute triangle