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

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

rec = set()

for i in range(n):

    rec.add(abs(x[i] - X))



rec = sorted(list(rec))





def gcd(a, b):

    if b == 0:

        return a

    else:

        return gcd(b, a % b)





num = rec[0]

for k in range(1, len(rec)):

    num = gcd(num, rec[k])





print(num)

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

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





def gcd(a, b):

    if b == 0:

        return a

    else:

        return gcd(b, a % b)





q = X[0]

for i in range(1, N):

    q = gcd(q, X[i])



print(q)
n, X = list(map(int, input().split()))
x = list(map(int, input().split()))
rec = set()
for i in range(n):
    rec.add(abs(x[i] - X))
rec = sorted(list(rec))


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


num = rec[0]
for k in range(1, len(rec)):
    num = gcd(num, rec[k])
print(num)

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


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


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

-n, X = list(map(int, input().split())) -x = list(map(int, input().split())) -rec = set() -for i in range(n): -    rec.add(abs(x[i] - X)) -rec = sorted(list(rec)) +N, x = list(map(int, input().split())) +X = list([abs(int(p) - x) for p in input().split()]) -num = rec[0] -for k in range(1, len(rec)): -    num = gcd(num, rec[k]) -print(num) +q = X[0] +for i in range(1, N): +    q = gcd(q, X[i]) +print(q)