BAMO 2011 Problem 5

Let S be a finite, nonempty set of real numbers such that the distance between any two distinct points in S is an element of S. In other words, |x-y| is in S whenever x \neq y and x and y are both in S.

Prove that the elements of S may be arranged in an arithmetic progression. This means that there are numbers a and d such that S=\{a, a+d, a+2 d, a+3 d, \ldots, a+k d, \ldots\}.