14. Express 2006 as the sum of 5 positive integers $x_{1}, x_{2}$, $x_{3}, x_{4}, x_{5}$. Let $S=\sum_{1 \leqslant i<j \leqslant 5} x_{i} x_{j}$. Find:
(1) When $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$ take what values, $S$ reaches its maximum value;
(2) Suppose for any $1 \leqslant i, j \leqslant 5$, there is $\left|x_{i}-x_{j}\right| \leqslant$ 2, when $x_{1}, x_{2}, x_{3}, x_{4}, x_{5}$ take what values, $S$ reaches its minimum value.
Explain your reasoning.
14. (1) First, the set of such $S$ values is bounded, so there must exist a maximum and a minimum value.

If $x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=2006$, and let $S=$ $\sum_{1 \leqslant i x_{1} x_{2}$.
\end{aligned}
$$

Rewrite $S$ as
$$
\begin{aligned}
S= & \sum_{1 \in i0$, which contradicts the assumption that $S$ reaches its maximum value at $x_{1}$, $x_{2}$, $x_{3}$, $x_{4}$, and $x_{5}$.
Therefore, it must be that $\left|x_{i}-x_{j}\right| \leqslant 1(1 \leqslant i, j \leqslant 5)$.
Thus, when $x_{1}=402, x_{2}=x_{3}=x_{4}=x_{5}=401$, the maximum value is achieved.
(2) When $x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=2006$ and $\left|x_{i}-x_{j}\right| \leqslant 2$, only the following three scenarios satisfy the requirements:
(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 the first scenario as follows:
$$
x_{i}^{\prime}=x_{i}-1, x_{j}^{\prime}=x_{j}+1
$$

According to the solution process in (1), 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$.