There are 40 girls and 32 boys who want to participate in 7th grade intramurals. If each team must have the same number of girls and the same number of boys, what is the greatest number of teams that can participate in intramurals? How many girls and boys will be on each team?