A math teacher and a science teacher combine their first period classes for a group activity. the math class has 24 students and the science class has 16 students.

the students need to divide themselves into groups of the same size. each group must have the same number of math students.

find the greatest number of groups possible. i need help.