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

A = sorted([int(i) for i in input().split()], reverse=True)

B = [abs(A[0] - x)]



for i in range(n-1):

    B.append(A[i] - A[i+1])

    

def gcd(x, y):

    while y > 0:

        x, y = y, x % y

    return x



for i in range(n-1):

    B[i+1] = gcd(B[i], B[i+1])

    

print((B[-1]))
n, x = list(map(int, input().split()))

A = [int(i) for i in input().split()]

D = []



for i in range(n):

    D.append(abs(x - A[i]))

    

def gcd(x, y):

    while y != 0:

        x, y = y, x % y

    return x



for i in range(n - 1):

    D[i + 1] = gcd(D[i], D[i + 1])

    

print((D[-1]))
n, x = list(map(int, input().split()))
A = sorted([int(i) for i in input().split()], reverse=True)
B = [abs(A[0] - x)]
for i in range(n - 1):
    B.append(A[i] - A[i + 1])


def gcd(x, y):
    while y > 0:
        x, y = y, x % y
    return x


for i in range(n - 1):
    B[i + 1] = gcd(B[i], B[i + 1])
print((B[-1]))

n, x = list(map(int, input().split()))
A = [int(i) for i in input().split()]
D = []
for i in range(n):
    D.append(abs(x - A[i]))


def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


for i in range(n - 1):
    D[i + 1] = gcd(D[i], D[i + 1])
print((D[-1]))

-A = sorted([int(i) for i in input().split()], reverse=True) -B = [abs(A[0] - x)] -for i in range(n - 1): -    B.append(A[i] - A[i + 1]) +A = [int(i) for i in input().split()] +D = [] +for i in range(n): +    D.append(abs(x - A[i])) -    while y > 0: +    while y != 0: -    B[i + 1] = gcd(B[i], B[i + 1]) -print((B[-1])) +    D[i + 1] = gcd(D[i], D[i + 1]) +print((D[-1]))