def gcd(a, b):

    if b == 0: return a

    return gcd(b, a % b)





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

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

x = sorted(x)

x = list([abs(arg - X) for arg in x])



g = x[0]

for xx in x:

    g = gcd(g, xx)

print(g)

def gcd(a, b):

    if b == 0: return a

    return gcd(b, a % b)





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

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

x = list([abs(arg - X) for arg in x])



g = x[0]

for xx in x[1:]:

    g = gcd(g, xx)

print(g)

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


N, X = list(map(int, input().split()))
x = list(map(int, input().split()))
x = sorted(x)
x = list([abs(arg - X) for arg in x])
g = x[0]
for xx in x:
    g = gcd(g, xx)
print(g)

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


N, X = list(map(int, input().split()))
x = list(map(int, input().split()))
x = list([abs(arg - X) for arg in x])
g = x[0]
for xx in x[1:]:
    g = gcd(g, xx)
print(g)

-x = sorted(x) -for xx in x: +for xx in x[1:]: