5. Find all values of the parameter $a$, for each of which the system of equations

$$
\left\{\begin{array}{l}
(|y-4|+|x+12|-3)\left(x^{2}+y^{2}-12\right)=0 \\
(x+5)^{2}+(y-4)^{2}=a
\end{array}\right.
$$

has exactly three solutions.
Answer: $a=16, a=53+4 \sqrt{123}$.

Solution. The first equation of the given system is equivalent to the combination of two equations $|y-4|+|x+12|=3$ and $x^{2}+y^{2}=12$. The first of these defines a square $G$ with center $(-12 ; 4)$, the diagonals of which are 6 and parallel to the coordinate axes. The second defines a circle $S$ with center $(0 ; 0)$ and radius $2 \sqrt{3}$.

The second equation of the original system, for $a>0$, defines a circle $\Omega$ with center $(-5 ; 4)$ and radius $R=\sqrt{a}$ (for $a\sqrt{41}+2 \sqrt{3}$), i.e., the system has 1 solution.

Thus, $R=4$ and $R=\sqrt{41}+2 \sqrt{3}$ are suitable. Therefore, $a=16$ and $a=53+4 \sqrt{123}$.