A P.E. teacher needs to divide 16 male students and 20 female students into teams, each with the same combination of male students and female students and nobody left out. What is the greatest number of teams that can be formed?