1. Let real numbers $a, b, c, d, e \geqslant -1$, and $a+b+c+d+e=5$. Find
$$
S=(a+b)(b+c)(c+d)(d+e)(e+a)
$$
the minimum and maximum values.
(Xiong Bin, problem contributor)
1. (1) First, find the minimum value of $S$, only considering the case of $S0$.
(i) If $a+b$, $b+c$, $c+d$, $d+e$, $e+a$ are all positive, by the AM-GM inequality we get
$$
\begin{array}{l}
S \leqslant\left(\frac{(a+b)+(b+c)+(c+d)+(d+e)+(e+a)}{5}\right)^{5} \\
=32 .
\end{array}
$$
(ii) If $a+b$, $b+c$, $c+d$, $d+e$, $e+a$ are three positive and two negative, by symmetry, we only need to consider the following two cases.
When $a+b$, $b+c0$, then $-2 \leqslant a+b0$, then $e=5-a-b-c-d \leqslant 7-b-c0$. Thus,
$$
0>(b+c)+(c+d)+(e+a)=5+c \geqslant 4,
$$
which is a contradiction. This case does not occur.

In summary, $S \leqslant 288$. When $a=b=c=-1$, $d=e=4$, $S$ reaches its maximum value of 288.