Yes. The water molecule is a compound of three atoms ...
-- two atoms of the element hydrogen
-- one atom of the element oxygen.
The chemical formula for the water molecule is H₂O .
It remains the same, no matter whether you're talking about
ice, water, or steam.