def gcd(a,b):

    if b == 0:

        return a

    else:

        return gcd(b,a%b)



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

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

lstx.append(x)

dx = [abs(lstx[i]-lstx[i-1]) for i in range(1,n+1)]



g = dx[0]

for i in range(1,n): 

    g = gcd(g,dx[i])



print(g)

def gcd(a,b):

    if b == 0:

        return a

    else:

        return gcd(b,a%b)



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

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



g = abs(lstx[0]-x)

for i in range(1,n): g = gcd(g,abs(lstx[i]-x))



print(g)

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


n, x = list(map(int, input().split()))
lstx = [int(i) for i in input().split()]
lstx.append(x)
dx = [abs(lstx[i] - lstx[i - 1]) for i in range(1, n + 1)]
g = dx[0]
for i in range(1, n):
    g = gcd(g, dx[i])
print(g)

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


n, x = list(map(int, input().split()))
lstx = [int(i) for i in input().split()]
g = abs(lstx[0] - x)
for i in range(1, n):
    g = gcd(g, abs(lstx[i] - x))
print(g)

-lstx.append(x) -dx = [abs(lstx[i] - lstx[i - 1]) for i in range(1, n + 1)] -g = dx[0] +g = abs(lstx[0] - x) -    g = gcd(g, dx[i]) +    g = gcd(g, abs(lstx[i] - x))