5. Misha and Masha had the same multi-digit integer in their notebooks, ending in 9876. Masha placed a plus sign between the third and fourth digits from the right, while Misha placed a plus sign between the fourth and fifth digits from the right. To the surprise of the schoolchildren, both resulting sums turned out to be the same. What number was originally written by the schoolchildren? Provide all possible answers and prove that there are no others.
Solution. Let the written number have the form $\overline{x 9876}$, where $x$ is also some natural number. Then Misha got the sum $x+9876$, and Masha got the sum $10 x+9+876$. From the equality $x+9876=10 x+9+876$ we find that $x$ $=999$.

Answer: 9999876 and there is no other number.

## CONDITION