8. Place two identical white balls, three identical red balls, and four identical black balls into three different bags. The number of ways to do this without leaving any bag empty is $\qquad$

Place the above text in English, preserving the original text's line breaks and format, and output the translation result directly.
8.723.

Let the three bags be denoted as bags $1, 2, 3$.
Let set $I$ be the set of all ways to place two identical white balls, three identical red balls, and four identical black balls into bags $1, 2, 3$; set $M_{i}$ be the set of all ways to place two identical white balls, three identical red balls, and four identical black balls into bags $1, 2, 3$ such that bag $i$ is empty.
Then the number of ways with no empty bags is
$$
\begin{array}{l}
m=|I|-\sum_{1 \leqslant i \leqslant 3}\left|M_{i}\right|+\sum_{1 \leqslant i<j \leqslant 3}\left|M_{i} \cap M_{j}\right| \\
=|I|-\mathrm{C}_{3}^{2}\left|M_{3}\right|+\mathrm{C}_{3}^{1}\left|M_{2} \cap M_{3}\right| .
\end{array}
$$

Let the number of white balls placed in bags $1, 2, 3$ be $x_{1}, x_{2}, x_{3}$, the number of red balls be $y_{1}, y_{2}, y_{3}$, and the number of black balls be $z_{1}, z_{2}, z_{3}$.
Then $|I|$ is the number of solutions to the system of equations
$$
\left\{\begin{array}{l}
x_{1}+x_{2}+x_{3}=2, \\
y_{1}+y_{2}+y_{3}=3,\left(x_{i}, y_{i}, z_{i} \in \mathbf{N}\right) \\
z_{1}+z_{2}+z_{3}=4
\end{array}\right.
$$

Thus, $|I|=\mathrm{C}_{4}^{2} \mathrm{C}_{5}^{2} \mathrm{C}_{6}^{2}=900$;
$\left|M_{3}\right|$ is the number of solutions to the system of equations
$$
\left\{\begin{array}{l}
x_{1}+x_{2}=2, \\
y_{1}+y_{2}=3,\left(x_{i}, y_{i}, z_{i} \in \mathbf{N}\right) \\
z_{1}+z_{2}=4
\end{array}\right.
$$

Thus, $\left|M_{3}\right|=\mathrm{C}_{3}^{1} \mathrm{C}_{4}^{1} \mathrm{C}_{5}^{1}=60$.
Clearly, $\left|M_{2} \cap M_{3}\right|=1$.
Therefore, $m=|I|-\mathrm{C}_{3}^{2}\left|M_{3}\right|+\mathrm{C}_{3}^{1}\left|M_{2} \cap M_{3}\right|$
$$
=900-3 \times 60+3=723 \text{. }
$$