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) Furthermore, 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 the reason.
(1) Without loss of generality, let $x_{1} \leqslant x_{2} \leqslant x_{3} \leqslant x_{4} \leqslant x_{5}$, and $x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=2006$.

If $x_{2}-x_{1}>2$, then let $x_{1}^{\prime}=x_{1}+1, x_{2}^{\prime}=x_{2}-1$.
At this point, $S^{\prime}-S=\left[x_{1}^{\prime} x_{2}^{\prime}+\left(x_{1}^{\prime}+x_{2}^{\prime}\right)\left(x_{3}+x_{4}+x_{5}\right)\right]-\left[x_{1} x_{2}+\left(x_{1}+x_{2}\right)\left(x_{3}+x_{4}+x_{5}\right)\right]$ $=x_{1}^{\prime} x_{2}^{\prime}-x_{1} x_{2}=\left(x_{1}+1\right)\left(x_{2}-1\right)-x_{1} x_{2}=x_{2}-x_{1}-1>0$.
We call the above process one adjustment. Each adjustment will increase the value of $S$. Thus, after a finite number of adjustments, we can ensure that for any $1 \leqslant i<j \leqslant 5$, $\left|x_{i}-x_{j}\right| \leqslant 2$, while $S$ reaches its maximum.

Since $2006=5 \times 401+1$, when $x_{1}=x_{2}=x_{3}=x_{4}=401, x_{5}=402$, $S_{\max }=6 \times 401^{2}+4 \times 401 \times 402=1609614$.
(2) According to the problem, $x_{1}+x_{2}+x_{3}+x_{4}+x_{5}$ has three scenarios: (1) $400+400+402+402+402$;
(2) $400+401+401+402+402$; (3) $401+401+401+401+402$.

Simple calculations yield $S_{1}=3 \times 402^{2}+6 \times 400 \times 402+400^{2}=1609612$;
$$
S_{2}=400 \times 1606+401^{2}+4 \times 401 \times 402+402^{2}=1609613 \text {. }
$$

In summary, when $x_{1}=x_{2}=400, x_{3}=x_{4}=x_{5}=402$, $S_{\min }=1609612$.