Eiruvin 8:11-9:1
Eiruvin 8:11
If two two-storey buildings faced one another in the same courtyard and residents of one made a pit and the residents of the other didn’t, the ones who made the pit may use it to dispose of their dirty water on Shabbos but the ones who didn’t make it may not.
Eiruvin 9:1
Rabbi Meir says that all the roofs in a town are considered one domain as long as no roof is ten handbreadths higher or lower than the others (about 30”). The Sages say that each roof is its own domain, while Rabbi Shimon says that the same rules applies to roofs, courtyards and karpeifs (enclosed storage areas) – they are all one domain for items that were there when Shabbos began but not when it comes to items that were only brought out after Shabbos began.