A drama class has a total of 40 students. The number of males is 6 more than the number of females. How many males and how many females are in the class?