Ohalos7: 3
הַמֵּת בַּבַּיִת וּבוֹ פְתָחִין הַרְבֵּה, כֻּלָּן טְמֵאִין. נִפְתַּח אֶחָד מֵהֶן, הוּא טָמֵא, וְכֻלָן טְהוֹרִים. חָשַׁב לְהוֹצִיאוֹ בְּאֶחָד מֵהֶן, אוֹ בְחַלּוֹן שֶׁהוּא אַרְבָּעָה עַל אַרְבָּעָה טְפָחִים, הִצִּיל עַל כָּל הַפְּתָחִים. בֵּית שַׁמַּאי אוֹמְרִים: יַחֲשׁוֹב עַד שֶׁלֹּא יָמוּת הַמֵּת; בֵּית הִלֵּל אוֹמְרִים: אַף מִשֶּׁמֵּת. הָיָה סָתוּם וְנִמְלַךְ לְפָתְחוֹ — בֵּית שַׁמַּאי אוֹמְרִים: כְּשֶׁיִּפְתַּח אַרְבָּעָה טְפָחִים; וּבֵית הִלֵּל אוֹמְרִים: כְּשֶׁיַּתְחִיל. וּמוֹדִים בְפוֹתֵחַ בַּתְּחִלָּה שֶׁיִּפְתַּח אַרְבָּעָה טְפָחִים.
[If] there is a corpse in a house with numerous entrances, all [utensils in the en-trances] become tamei. [If] one [door] is opened, it is tamei, and the others are tahor. [If] it was decided to remove [the corpse] through one of the [doors], or through a window four handbreadths square, tumah is curtailed from all the other entrances. Beis Shammai say: It must be decided before the person dies. Beis Hillel say: [It can be decided] even after the person dies. If [an entrance] was sealed and he decided to open it — Beis Shammai say: When he opens four handbreadths [it will curtail tumah from the other entrances]; but Beis Hillel say: As soon as he begins [to open it]. But they [both] agree that a doorway created for the first time must be opened four handbreadths.