Task B-2.5. Determine all natural numbers $m$ such that the equation $\left|x^{2}-5 x+4\right|=m$ has exactly four distinct real solutions.
First solution. Since $m$ is a natural number, we have $x^{2}-5 x+4=m$ or $x^{2}-5 x+4=-m$, i.e.,

$$
x^{2}-5 x+4-m=0 \quad \text { or } \quad x^{2}-5 x+4+m=0
$$

Each of these equations will have two distinct real solutions if its discriminant is greater than 0. Therefore, it must hold that

$$
25-4 \cdot(4-m)>0 \quad \text { and } \quad 25-4 \cdot(4+m)>0
$$

From this, it follows that $m>-\frac{9}{4}$ and $m<\frac{9}{4}$.

Since $m \in \mathbb{N}$, it follows that $m=1$ or $m=2$.