from fractions import gcd

import numpy as np

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

xlist = np.array(list(map(int, input().split())))

xabs = np.abs(xlist - X)

num = xabs[0]

for x in xabs:

    num = gcd(x, num)

print(num)

from functools import reduce

import fractions

from warnings import simplefilter

simplefilter("ignore")

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

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

sbn = [abs(x - X) for x in xlist]





def gcd_list(numbers):

    return reduce(fractions.gcd, numbers)





print((gcd_list(sbn)))

from fractions import gcd
import numpy as np

N, X = list(map(int, input().split()))
xlist = np.array(list(map(int, input().split())))
xabs = np.abs(xlist - X)
num = xabs[0]
for x in xabs:
    num = gcd(x, num)
print(num)

from functools import reduce
import fractions
from warnings import simplefilter

simplefilter("ignore")
N, X = list(map(int, input().split()))
xlist = list(map(int, input().split()))
sbn = [abs(x - X) for x in xlist]


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


print((gcd_list(sbn)))

-from fractions import gcd -import numpy as np +from functools import reduce +import fractions +from warnings import simplefilter +simplefilter("ignore") -xlist = np.array(list(map(int, input().split()))) -xabs = np.abs(xlist - X) -num = xabs[0] -for x in xabs: -    num = gcd(x, num) -print(num) +xlist = list(map(int, input().split())) +sbn = [abs(x - X) for x in xlist] + + +def gcd_list(numbers): +    return reduce(fractions.gcd, numbers) + + +print((gcd_list(sbn)))