Shabbos1: 1
יְצִאוֹת הַשַּׁבָּת שְׁתַּיִם שֶׁהֵן אַרְבַּע בִּפְנִים, וּשְׁתַּים שֶׁהֵן אַרְבַּע בַּחוּץ. כֵּיצַד? הֶעָנִי עוֹמֵד בַּחוּץ וּבַעַל הַבַּיִת בִּפְנִים: פָּשַׁט הֶעָנִי אֶת יָדוֹ לִפְנִים וְנָתַן לְתוֹך יָדוֹ שֶׁל בַּעַל הַבַּיִת, אוֹ שֶׁנָּטַל מִתּוֹכָהּ וְהוֹצִיא — הֶעָנִי חַיָּב וּבַעַל הַבַּיִת פָּטוּר; פָּשַׁט בַּעַל הַבַּיִת אֶת יָדוֹ לַחוּץ וְנָתַן לְתוֹךְ יָדוֹ שֶׁל עָנִי, אוֹ שֶׁנָּטַל מִתּוֹכָהּ וְהִכְנִיס — בַּעַל הַבַּיִת חַיָּב וְהֶעָנִי פָּטוּר; פָּשַׁט הֶעָנִי אֶת יָדוֹ לִפְנִים וְנָטַל בַּעַל הַבַּיִת מִתּוֹכָהּ, אוֹ שֶׁנָּתַן לְתוֹכָהּ וְהוֹצִיא — שְׁנֵיהֶם פְּטוּרִין. פָּשַׁט בַּעַל הַבַּיִת אֶת יָדוֹ לַחוּץ וְנָטַל הֶעָנִי מִתּוֹכָהּ, אוֹ שֶׁנָּתַן לְתוֹכָהּ וְהִכְנִיס — שְׁנֵיהֶם פְּטוּרִין.
The [types of] transfers on the Sabbath are two which are [in reality] four within, and two which are [in reality] four outside. How is this so? The poor man is standing outside and the householder inside: If the poor man extended his hand inside and placed [an object] into the householder’s hand, or if he took [an object] from it and brought [that object] out — the poor man is liable and the householder is exempt; if the householder extended his hand outside and placed [an object] into the poor man’s hand, or if he took [an object] out of it and brought [that object] in — the householder is liable and the poor man is exempt; if the poor man extended his hand inside and the householder took [an object] from it, or placed [an object] into it and he [the poor man] brought [that object] out — both are exempt; if the householder extended his hand outside and the poor man took [an object] from it, or placed [an object] into it and he [the householder] brought [that object] in — both are exempt.