Problem

Source:

Tags: AMC, AIME



Let $S$ be a subset of $\{1, 2, 3, \cdots, 1989 \}$ in which no two members differ by exactly $4$ or by exactly $7$. What is the largest number of elements $S$ can have?