Slavěna wrote down four different natural numbers in colored markers: red, blue, green, and yellow. When she divides the red number by the blue one, she gets the green number as the incomplete quotient and the yellow number represents the remainder of this division. When she divides the blue number by the green one, the division comes out without a remainder, and the quotient is the yellow number. Slavěna revealed that two of her four numbers are 97 and 101.

Determine the other two of Slavěna's numbers and assign colors to each number. Find all possible solutions.

(M. Petrová)

Hint. Which of the mentioned colors cannot have the numbers 97 and 101?
We will denote the numbers by the initial letters of their colors, i.e., $\check{c}, m$, $z, \check{z}$. The information about the division can then be written as:

$$
\check{c}=m \cdot z+\check{z}, \quad m=z \cdot \check{z} .
$$

Since the numbers must be distinct, it follows from the second equation that neither $z$ nor $\check{z}$ is 1. This means that $m$ is a composite number. Substituting the second equation into the first, we get

$$
\check{c}=z^{2} \cdot \check{z}+\check{z}=\left(z^{2}+1\right) \cdot \check{z} .
$$

From the above, we know that both $z^{2}+1$ and $\check{z}$ are not 1, so $\check{c}$ is also a composite number. Since both 97 and 101 are prime numbers, neither of them can be blue or red.

Therefore, one of the numbers 97 and 101 is yellow and the other is green. The remaining numbers can be calculated from the initial equations:

| $\check{z}$ | $z$ | $m$ | $\check{c}$ |
| :---: | :---: | :---: | :---: |
| 97 | 101 | 9797 | 989594 |
| 101 | 97 | 9797 | 950410 |

Note. The problem can also be solved by systematically testing the possibilities: pairs of known numbers are substituted into the initial equations and the existence of the remaining pair of numbers is verified. For example, substituting $\check{c}=101$ and $m=97$ into the first equation determines $z=1$ and $\check{z}=4$, which does not satisfy the second equation. This method would require checking 12 possibilities.

Any additional insight can reduce the number of possibilities to verify. For example (in addition to the conditions mentioned in the previous solution), it holds that $\check{c}$ is greater than any of the other numbers and $m$ is greater than both $z$ and $\check{z}$. In particular, $\check{c}$ cannot be 97, and this possibility does not need to be considered.