16. (25 points) Given $A \subseteq\{1,2, \cdots, 2014\}$, let real numbers $\lambda_{1} 、 \lambda_{2} 、 \lambda_{3} 、 x_{1} 、 x_{2} 、 x_{3}$ satisfy
(i) $\lambda_{1} 、 \lambda_{2} 、 \lambda_{3} \in\{-1,0,1\}$ and not all are 0;
(ii) $x_{1}, x_{2} 、 x_{3} \in A$;
(iii) If $x_{i}=x_{j}$, then $\lambda_{i} \lambda_{j} \neq-1(1 \leqslant i 、 j \leqslant 3)$.
If all numbers of the form $x_{1} x_{2} x_{3}$ and $\lambda_{1} x_{1}+\lambda_{2} x_{2}+\lambda_{3} x_{3}$ are not multiples of 2014, then the set $A$ is called a "good set". Find the maximum number of elements in a good set $A$.
16. (1) Construct a good set $A$ with 503 elements.

Let $A=\{1,3,5, \cdots, 1005\}$.
If $\lambda_{1} 、 \lambda_{2} 、 \lambda_{3}$ are all non-zero, then
$$
\lambda_{1} x_{1}+\lambda_{2} x_{2}+\lambda_{3} x_{3} \equiv x_{1}+x_{2}+x_{3} \equiv 1(\bmod 2) \text {. }
$$

Thus, $\lambda_{1} x_{1}+\lambda_{2} x_{2}+\lambda_{3} x_{3}$ is odd and cannot be a multiple of 2014.

If $\lambda_{1} 、 \lambda_{2} 、 \lambda_{3}$ include 0, assume $\lambda_{3}=0$, then by condition (i), at least one of $\lambda_{1} 、 \lambda_{2}$ is non-zero.
By condition (iii), $\lambda_{1} x_{1}+\lambda_{2} x_{2} \neq 0$.
Notice that,
$$
\begin{array}{l}
\left|\lambda_{1} x_{1}+\lambda_{2} x_{2}\right| \leqslant\left|\lambda_{1} x_{1}\right|+\left|\lambda_{2} x_{2}\right| \\
\leqslant\left|x_{1}\right|+\left|x_{2}\right| \leqslant 2 \times 10051007$, then changing $\lambda_{i}$ to $-\lambda_{i}$ and $x_{i}$ to $2014-x_{i}$ results in a number that is congruent to $\lambda_{1} x_{1}+\lambda_{2} x_{2}+\lambda_{3} x_{3}$ modulo 2014.
We now discuss different cases for $r$.
1) If $d \leqslant r<2 d$, then at most $d-1$ numbers in $d+1, d+2, \cdots, d+r$ belong to the set $S$.
$$
\begin{array}{l}
\text { Hence }|S| \leqslant 1+(d-1)+d q=d q+d \\
\leqslant d q+\frac{r}{2}+\frac{d}{2}=503 .
\end{array}
$$
2) If $0 \leqslant r \leqslant d-1$, then
$$
\begin{array}{l}
|S| \leqslant 1+r+d q \leqslant d q+\frac{r}{2}+\frac{d}{2}+\frac{1}{2}=503.5 \\
\Rightarrow|S| \leqslant 503 .
\end{array}
$$

Therefore, any good set $S$ must satisfy $|S| \leqslant 503$. From (1) and (2), we know that the maximum number of elements in a good set $A$ is 503.