One-third of the class grew peas, one-third grew carrots, and one-third grew beans. The class consisted of 42 students of which three-sevenths were girls. The teacher chose the three groups to be as equal in their boy-girl composition as possible. How many boys and girls were assigned to each team?

21