Chagiga1: 1
הַכֹּל חַיָּבִין בִּרְאִיָּה, חוּץ מֵחֵרֵשׁ, שׁוֹטֶה, וְקָטָן, וְטֻמְטוּם, וְאַנְדְּרוֹגִינוֹס, וְנָשִׁים, וַעֲבָדִים שֶׁאֵינָם מְשֻׁחְרָרִים, הַחִגֵּר, וְהַסּוּמָא, וְהַחוֹלֶה, וְהַזָּקֵן, וּמִי שֶׁאֵינוֹ יָכוֹל לַעֲלוֹת בְּרַגְלָיו.  אֵיזֶהוּ קָטָן? כָּל שֶׁאֵינוֹ יָכוֹל לִרְכֹּב עַל כְּתֵפָיו שֶׁל אָבִיו וְלַעֲלוֹת מִירוּשָׁלַיִם לְהַר הַבַּיִת; דִּבְרֵי בֵּית שַׁמַּאי.  וּבֵית הִלֵּל אוֹמְרִים: כָּל שֶׁאֵינוֹ יָכוֹל לֶאֱחֹז בְּיָדוֹ שֶׁל אָבִיו וְלַעֲלוֹת מִירוּשָׁלַיִם לְהַר הַבַּיִת, שֶׁנֶּאֱמַר: ,,שָׁלֹשׁ רְגָלִים”.
All are obligated in re'iyah except for a deaf person, an imbecile, a minor, a person of undetermined sex, a hermaphrodite, women, slaves who have not been freed, the lame, the blind, the infirm, the aged, and one who is unable to ascend by foot.  Who is deemed a minor? Whoever cannot ride on his father's shoulders and ascend from Jerusalem to the Temple Mount —- [these are] the words of Beis Shammai.  Beis Hillel say: Whoever cannot hold his father's hand and ascend from Jerusalem to the Temple Mount, for the verse states: three pilgrimages (Exodus 23:14).