5. Let $a, b, c$ and $d$ be complex numbers. If the set $S=\{a, b, c, d\}$ has the property “for any $x, y \in S$, there must be $x y \in S$”, then when $a^{2}=1, b^{2}=1, c^{2}=b$, $b+c+d=$ $\qquad$ .
Given that $\{a, b\}=\{1,-1\}$, if $b=1$, then $c \in\{-1,1\}$, which is a contradiction, so $b=-1$.
Thus, $\{c, d\}=\{\mathrm{i},-\mathrm{i}\}$, and it is verified that this satisfies the conditions. Therefore, $b+c+d=-1$.