Torah Temimah cites Chagigah 12a.
What is “shamayim”? Rabbi Yose bar Chanina said: “sham mayim” — there is water. It was taught in a baraisa: Shamayim — fire and water; this teaches that the Holy One, blessed be He, brought them and mixed them together and made from them the firmament.
Category B — Textual / lexical / linguistic method.
Method — The derashah offers two sound-based readings of shamayim: sham mayim (“there is water”) and eish + mayim (“fire and water”). In the second reading, the mixture of fire and water forms the firmament.
Textual trigger — The Hebrew word שָׁמַיִם is split as שָׁם מַיִם and also associated with אֵשׁ וּמַיִם in the baraisa on Chagigah 12a.