There are 72 boys and 90 girls on a math competition team. For the next competition, Mr. Johnson would like to arrange all the students in equal rows with only girls or only boys in each row. What is the greatest number of students that can be in each row?