Two classes are organizing a joint club afternoon. To cover the costs, each student from class $A$ contributed $5 \mathrm{Ft}$, and each student from class $B$ contributed $3 \mathrm{Ft}$. If the entire cost had been covered by the students of class $A$, it would have cost each of them $K \mathrm{Ft}$. For the second such joint event, the students from class $A$ contributed $4 \mathrm{Ft}$, and those from class $B$ contributed $6 \mathrm{Ft}$, and this way, as much money was collected as if each student from class $B$ had contributed $K \mathrm{Ft}$. What is the value of $K$, and which class has more students?
Let the number of students in class $A$ be $a$, and in class $B$ be $b$. The students from both classes together paid $F=(5a+3b)+(4a+6b)=9(a+b)$ forints for the two events. If the students from class $A$ bring $K$ forints per person for the first event, and the students from class $B$ bring $K$ forints per person for the second event, then $Ka+Kb=K(a+b)$ forints will be collected, which, according to the condition, is equal to $F$, so

$$
9(a+b)=K(a+b)
$$

Since the value of $a+b$ is not zero, it follows that $K=9$. Thus, at the first event, the students from $A$ need to bring 9 Ft instead of 5 Ft so that the students from $B$ do not have to pay 3 Ft per person. Therefore, the 3 forints per person from the $B$ students together amount to the same as the 4 forints per person from the $A$ students. This can only be the case if more students attend class $B$.