Suppose $a_1,\ldots,a_n$ are integers whose greatest common divisor is $1$. Let $S$ be a set of integers with the following properties:
(a) For $i=1,\ldots,n$, $a_i\in S$.
(b) For $i,j=1,\ldots,n$ (not necessarily distinct), $a_i-a_j\in S$.
(c) For any integers $x,y\in S$, if $x+y\in S$, then $x-y\in S$.
Prove that $S$ must be equal to the set of all integers.