We have a list of numbers represented by $a_1,a_2,... ,a_n$.We have to find all those $k$ for which
$$a_1 = a_2 = \cdots =a_n \pmod k.$$
How do we approach this problem mathematically?
Basically , we need to find all those $k$ for which all the numbers in the list gives same when we do modulus with that $k$.
Hint: $a_i-a_j \equiv 0 \bmod k$ $\implies k \mid a_i-a_j$ $\implies k \mid \gcd \,\{a_i - a_j \mid 1 \le i \lt j \le n\}$.