Prove that a closed subset E of a metric space (M,d) is disconnected iff there exists disjoint nonempty closed sets E1, E2 such that E=E1UE2.

for the --> direction, we have E is disconnected, then by definition there exists nonempty disjoint open sets A,B s.t E=AUB, how do I turn this into a union of 2 closed sets, we can't just say since E is closed, then its subsets is closed, right?

also need some hint for the other direction.