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

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



def gcd(x, y):

  return x if y == 0 else gcd(y, x % y)



D = []

for a in A:

  D.append(abs(X - a))



answer = 0

for d in D:

  answer = gcd(answer, d)



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

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



def gcd(x, y):

  return x if y == 0 else gcd(y, x % y)



answer = 0

for a in A:

  answer = gcd(answer, a)



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


def gcd(x, y):
    return x if y == 0 else gcd(y, x % y)


D = []
for a in A:
    D.append(abs(X - a))
answer = 0
for d in D:
    answer = gcd(answer, d)
print(answer)

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


def gcd(x, y):
    return x if y == 0 else gcd(y, x % y)


answer = 0
for a in A:
    answer = gcd(answer, a)
print(answer)

-A = list(map(int, input().split())) +A = list([abs(X - int(x)) for x in input().split()]) -D = [] +answer = 0 -    D.append(abs(X - a)) -answer = 0 -for d in D: -    answer = gcd(answer, d) +    answer = gcd(answer, a)