A math class has a total of 31 students. The number of females is seven less than the number of meals. How many miles and how many females are in the class?