14 Express 2006 as the sum of 5 positive integers $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$. Let $S=\sum_{1 \leq i<j \leqslant 5} x_{i} x_{j}$. Ask:
(1) For what values of $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$, does $S$ reach its maximum value?
(2) Furthermore, for any $1 \leqslant i, j \leqslant 5$ there is $\left|x_{i}-x_{j}\right| \leqslant 2$, for what values of $x_{i}$, $x_{2}, x_{3}, x_{4}, x_{5}$, does $\mathrm{S}$ reach its minimum value? Explain your reasoning.
(1) First, the set of such $S$ values is bounded, so there must exist a maximum and a minimum. If $x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=2006$, and $S=\sum_{1 \leqslant i x_{1} x_{2}$.

Rewrite $S$ as
$$
\begin{aligned}
S & =\sum_{1 \leqslant i<j \leqslant 5} x_{i} x_{j} .
\end{aligned}
$$
If $x_{1} \geqslant x_{2} \geqslant x_{3} \geqslant x_{4} \geqslant x_{5}$ and $x_{1} - x_{5} \geqslant 2$, then let $x_{1}^{\prime}=x_{1}-1, x_{5}^{\prime}=x_{5}+1$. We have
$$
\begin{aligned}
S^{\prime} & =\sum_{1 \leqslant i<j \leqslant 5} x_{i}^{\prime} x_{j}^{\prime} \\
& =\sum_{1 \leqslant i<j \leqslant 5} x_{i} x_{j} + (x_{2} + x_{3} + x_{4}) - (x_{1} + x_{5}) + 1 \\
& = S + (x_{2} + x_{3} + x_{4}) - (x_{1} + x_{5}) + 1 \\
& > S .
\end{aligned}
$$
This contradicts the assumption that $S$ achieves its maximum value at $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$. Therefore, we must have $\left|x_{i}-x_{j}\right| \leqslant 1(1 \leqslant i, j \leqslant 5)$. Thus, the maximum value is achieved when $x_{1}=402, x_{2}=x_{3}=x_{4}=x_{5}=401$.
(2) When $x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=2006$ and $\left|x_{i}-x_{j}\right| \leqslant 2$, the only scenarios that satisfy the requirements are:
(I) $402,402,402,400,400$;
(II) $402,402,401,401,400$;
(III) $402,401,401,401,401$.

The latter two scenarios are obtained by adjusting $x_{i}^{\prime}=x_{i}-1, x_{j}^{\prime}=x_{j}+1$ from the first scenario. According to the proof in the previous part, each adjustment increases the sum $S=\sum_{1 \leqslant i<j \leqslant 5} x_{i} x_{j}$. Therefore, the minimum value is achieved when $x_{1}=x_{2}=x_{3}=402, x_{4}=x_{5}=400$.
(20 points)