Solution (source code)

= Solution

The sets $Y\cap C$ and $Y\cap D$ are relatively open in the <subspace topology> on $Y$. They are disjoint and their union is $Y$. If both were nonempty, they would be a separation of $Y$, contradicting its <connectedness>. Therefore at least one is empty, and \b[$Y$ lies entirely in $C$ or entirely in $D$]. The assertion also holds for empty $Y$.