x*z=32
y*z=24
Z is the greatest common divisor of 32 and 24, which is 8.
x=32/z=32/8=4
y=24/z=24/8=3
x+y=4+3=7
It can be divided into 8 groups, with a maximum of 7 people in each group.