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

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



ans = abs(axis[0] - X)



def gcd(n, m) :

    n, m = max(n, m), min(n, m)

    if m == 0 :

        return n

    return gcd(m, n % m)



for a in axis :

    ans = gcd(ans, abs(a - X))



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

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



def gcd(n, m):

    if m == 0:

        return n

    return gcd(m, n % m)



B = [abs(a - A[0]) for a in A]

ans = 0

for d in B:

    ans = gcd(ans, d)

print(ans)

N, X = list(map(int, input().split()))
axis = list(map(int, input().split()))
ans = abs(axis[0] - X)


def gcd(n, m):
    n, m = max(n, m), min(n, m)
    if m == 0:
        return n
    return gcd(m, n % m)


for a in axis:
    ans = gcd(ans, abs(a - X))
print(ans)

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


def gcd(n, m):
    if m == 0:
        return n
    return gcd(m, n % m)


B = [abs(a - A[0]) for a in A]
ans = 0
for d in B:
    ans = gcd(ans, d)
print(ans)

-axis = list(map(int, input().split())) -ans = abs(axis[0] - X) +A = [X] + list(map(int, input().split())) -    n, m = max(n, m), min(n, m) -for a in axis: -    ans = gcd(ans, abs(a - X)) +B = [abs(a - A[0]) for a in A] +ans = 0 +for d in B: +    ans = gcd(ans, d)