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

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

has exactly three solutions.
Answer: $a=49, a=40-4 \sqrt{51}$.

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

The second equation of the original system, for $a>0$, defines a circle $\Omega$ with center at $(-3, 5)$ and radius $R=\sqrt{a}$ (for $a>7$), i.e., the system has 1 solution.
3) $R=7$. Then there is one common point with the square $G$ and two common points with the circle $S$ (since $\sqrt{34}-\sqrt{6}<7<\sqrt{34}+\sqrt{6}$), i.e., the system has 3 solutions.
4) $R=3$. Then there is one common point with the square $G$ and no common points with the circle $S$ (since $3<\sqrt{34}-\sqrt{6}$), i.e., the system has 1 solution.

Thus, $R=7$ and $R=\sqrt{34}-\sqrt{6}$ are suitable. Then $a=49$ and $a=40-4 \sqrt{51}$.