There are 40 people in Class 5 1 and 32 people in Class 5 2. The two classes participate in an activity together, and the two classes are divided into groups. It is required that the number of people in each group of the two classes is the same, and there should be no surplus. How many people can each group have at most?
五1班有40人，五2班有32人，两个班一起参加一项活动，将两班分别分组，要求两班每组人数均相同，并且不能有剩余，每组最多有多少人？
<gadget id="calculator">2 * 2 * 2</gadget>
<output>8</output>

<result>8</result>