5. (7 points) Vanya, Tanya, and Olya have 12 identical balls: some yellow, some blue, and some red. They distributed the balls into three identical bags, 4 balls in each.

Vanya said: "Look, there are no three identical balls in any bag!" Tanya said: "That's right. But there are also no three different balls in any bag!" Olya said: "And all the bags turned out to be different!" All three were correct. Is it necessary that in some bag there are two yellow and two red balls? Explain your answer in detail.
Answer. Yes, definitely.

Solution. Each package contains balls of different colors, otherwise Vanya would be wrong. But there cannot be balls of three different colors in any package, otherwise Tanya would be wrong. Therefore, each package contains balls of exactly two colors: 2 balls of one color and 2 balls of another color (since there cannot be three balls of the same color). All packages are different, so the pair of colors in each package must differ from the pair of colors in another package. This means that one package contained two yellow and two blue balls, another contained two blue and two red balls, and the third contained two yellow and two red balls.

## Grading Criteria.

- Any correct and justified solution - 7 points.
- The correct answer is provided, but the justification is incomplete - 5 points.
- It is stated without justification that each package contains two balls of different colors, and the correct answer is derived from this - 2 points.
- Only the answer is provided - 0 points.

Maximum score for all completed tasks - 35.