4. Students from two classes agreed to play football. In one of the classes, there were not enough players to form a team of 11 students, so they agreed to mix the students from both classes and then form two teams. The teacher noticed that in the first class, boys are 4/13 of the students, while in the second class, boys are 5/17 of the students. Each class has no more than 50 students. Which class has more girls? (Explain your answer)
Solution. Let the number of students in the first class be $x$, and the number of students in the second class be $y$.

Then the number of boys in the first class is $\frac{4 x}{13}$, and in the second class, it is $\frac{5 y}{17}$. Since $\frac{4 x}{13}$ must be a natural number, $4 x$ must be divisible by 13, i.e., $x=13, 26$, or 39. The corresponding number of boys is $4, 8, 12$.

Similarly, $\frac{5 y}{17}$ must be a natural number, so $5 y$ must be divisible by 17, then $y=17$ or 34. The corresponding number of boys is 5 or 10.

Since $22=12+10$, we have that the first class has 39 students, of which 12 are boys, i.e., 27 girls. The second class has 34 students, of which 10 are boys, i.e., 24 girls.

Thus, the first class has more girls.