N, X = list(map(int, input().split()))

X_list = list(map(int, input().split()))

X_list.append(X)

X_list.sort()

kyori_list = []

for i, x in enumerate(X_list):

    if i == len(X_list) - 1:

        break

    kyori_list.append(X_list[i + 1] - x)



import fractions

from functools import reduce





def gcd_list(*numbers):

    return reduce(fractions.gcd, numbers)





print((gcd_list(*kyori_list)))
N, X = list(map(int, input().split()))

X_list = list(map(int, input().split()))

kyori = [abs(X - x) for x in X_list]





def gcd(x, y):

    if y == 0:

        return x

    return gcd(y, x % y)





ans = kyori[0]

for i in range(1, N):

    ans = gcd(ans, kyori[i])

print(ans)

N, X = list(map(int, input().split()))
X_list = list(map(int, input().split()))
X_list.append(X)
X_list.sort()
kyori_list = []
for i, x in enumerate(X_list):
    if i == len(X_list) - 1:
        break
    kyori_list.append(X_list[i + 1] - x)
import fractions
from functools import reduce


def gcd_list(*numbers):
    return reduce(fractions.gcd, numbers)


print((gcd_list(*kyori_list)))

N, X = list(map(int, input().split()))
X_list = list(map(int, input().split()))
kyori = [abs(X - x) for x in X_list]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


ans = kyori[0]
for i in range(1, N):
    ans = gcd(ans, kyori[i])
print(ans)

-X_list.append(X) -X_list.sort() -kyori_list = [] -for i, x in enumerate(X_list): -    if i == len(X_list) - 1: -        break -    kyori_list.append(X_list[i + 1] - x) -import fractions -from functools import reduce +kyori = [abs(X - x) for x in X_list] -def gcd_list(*numbers): -    return reduce(fractions.gcd, numbers) +def gcd(x, y): +    if y == 0: +        return x +    return gcd(y, x % y) -print((gcd_list(*kyori_list))) +ans = kyori[0] +for i in range(1, N): +    ans = gcd(ans, kyori[i]) +print(ans)