def gcd(A, B):

    if A%B == 0:

        return B

    else:

        return gcd(B, A%B)

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

x = [abs(int(i) - X) for i in input().split()] 

if N == 1:

    print((x[0]))

    exit()

gcd_x = []

for i in range(N-1):

    gcd_x.append(gcd(x[i], x[i+1]))

print((min(gcd_x)))
def gcd(A, B):

    while B != 0:

        A, B = B, A%B

    return A

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

x = [abs(int(i) - X) for i in input().split()] 

y = x[0]

for i in range(N):

    if x[i] % y == 0:

        continue

    y = gcd(y, x[i])

print(y)
def gcd(A, B):
    if A % B == 0:
        return B
    else:
        return gcd(B, A % B)


N, X = list(map(int, input().split()))
x = [abs(int(i) - X) for i in input().split()]
if N == 1:
    print((x[0]))
    exit()
gcd_x = []
for i in range(N - 1):
    gcd_x.append(gcd(x[i], x[i + 1]))
print((min(gcd_x)))

def gcd(A, B):
    while B != 0:
        A, B = B, A % B
    return A


N, X = list(map(int, input().split()))
x = [abs(int(i) - X) for i in input().split()]
y = x[0]
for i in range(N):
    if x[i] % y == 0:
        continue
    y = gcd(y, x[i])
print(y)

-    if A % B == 0: -        return B -    else: -        return gcd(B, A % B) +    while B != 0: +        A, B = B, A % B +    return A -if N == 1: -    print((x[0])) -    exit() -gcd_x = [] -for i in range(N - 1): -    gcd_x.append(gcd(x[i], x[i + 1])) -print((min(gcd_x))) +y = x[0] +for i in range(N): +    if x[i] % y == 0: +        continue +    y = gcd(y, x[i]) +print(y)