Let S be a subset of 1,2,3,…,1500 such that the following two conditions hold:
What is the maximum possible number of elements in S?
374
375
376
377
378