# encoding: utf-8

import math



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

x = sorted(list(map(int, input().split())) + [X])



def gcf2(a, b):

    if b == 0: return a

    else: return gcf2(b, (a % b))



# Greatest common factor

# print(x)

GCF = x[1] - x[0]

x_min = x[0]

for i, xi in enumerate(x):

    if i == 0: continue

    GCF = gcf2(GCF, (xi - x_min))



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

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



# targ = []

# # targ.append(abs(X - x[0]))

# for i in range(N - 1):

#     targ.append(abs(x[i + 1] - x[i]))



def mygcd(a, b):

    # print("#", a, b)

    if a < b: return mygcd(b, a)

    elif b == 0: return a

    else: return mygcd(b, a % b)



ans = abs(X - x[0])

for i in range(N - 1):

    ans = mygcd(ans, abs(x[i + 1] - x[i]))



print(ans)
# encoding: utf-8
import math

N, X = list(map(int, input().split()))
x = sorted(list(map(int, input().split())) + [X])


def gcf2(a, b):
    if b == 0:
        return a
    else:
        return gcf2(b, (a % b))


# Greatest common factor
# print(x)
GCF = x[1] - x[0]
x_min = x[0]
for i, xi in enumerate(x):
    if i == 0:
        continue
    GCF = gcf2(GCF, (xi - x_min))
print(GCF)

N, X = list(map(int, input().split()))
x = list(map(int, input().split()))
# targ = []
# # targ.append(abs(X - x[0]))
# for i in range(N - 1):
#     targ.append(abs(x[i + 1] - x[i]))
def mygcd(a, b):
    # print("#", a, b)
    if a < b:
        return mygcd(b, a)
    elif b == 0:
        return a
    else:
        return mygcd(b, a % b)


ans = abs(X - x[0])
for i in range(N - 1):
    ans = mygcd(ans, abs(x[i + 1] - x[i]))
print(ans)

-# encoding: utf-8 -import math - -x = sorted(list(map(int, input().split())) + [X]) +x = list(map(int, input().split())) +# targ = [] +# # targ.append(abs(X - x[0])) +# for i in range(N - 1): +#     targ.append(abs(x[i + 1] - x[i])) +def mygcd(a, b): +    # print("#", a, b) +    if a < b: +        return mygcd(b, a) +    elif b == 0: +        return a +    else: +        return mygcd(b, a % b) -def gcf2(a, b): -    if b == 0: -        return a -    else: -        return gcf2(b, (a % b)) - - -# Greatest common factor -# print(x) -GCF = x[1] - x[0] -x_min = x[0] -for i, xi in enumerate(x): -    if i == 0: -        continue -    GCF = gcf2(GCF, (xi - x_min)) -print(GCF) +ans = abs(X - x[0]) +for i in range(N - 1): +    ans = mygcd(ans, abs(x[i + 1] - x[i])) +print(ans)