4. Given the set $S=\{1,2,3, \cdots, 1997\}, A=\left\{a_{1}, a_{2}, \cdots, a_{k}\right\}$ is a subset of $S$, with the property: “the sum of any two different elements in $A$ cannot be divisible by 117”. Determine the maximum value of $k$, and prove your conclusion.
4. Partition $S$ into the union of pairwise disjoint subsets: $F_{0} \cup F_{1} \cup \cdots \cup F_{116}$, where $F_{i}$ is the set of elements in $S$ that have a remainder of $i$ when divided by 117 $(i=0,1, \cdots, 116)$, and let $\left|F_{i}\right|$ denote the number of elements in $F_{i}$, then $\left|F_{0}\right|=17,\left|F_{1}\right|=\left|F_{2}\right|=\cdots=\left|F_{8}\right|=$ $18,\left|F_{9}\right|=\left|F_{10}\right|=\cdots=\left|F_{116}\right|=17, F_{0}$ contains at most one number selected into $A$, and between $F_{k}$ and $F_{117-k}$, only the elements of one set are all selected into $A$. To maximize the number of elements in $A$, the elements of $A_{1}, A_{2}, \cdots, A_{8}$ should all be selected into $A$, thus the maximum number of elements in this $A$ is $1+\left|F_{1}\right|+\cdots+\left|F_{58}\right|=1+18 \times 8+17 \times 50=995$, and $A=\{117\} \cup F_{1} \cup \cdots \cup F_{58}$, which clearly satisfies the condition. Therefore, the maximum value of $k$ is 995.