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

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

diff = [abs(x - X) for x in list]

diff.sort()



def gcd(a,b):

    while b:

        a,b = b,a%b

    return a



#差の最大公約数を取得

gcd_val = diff[0]

for i in diff[1:]:

    gcd_val = gcd(i,gcd_val)



print(gcd_val)

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

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

diff = [abs(x-X) for x in list]



def gcd(a,b):

    while b:

        a,b = b,a%b

    return a



if len(diff) >= 2:

    gcd_val = diff[0]

    for i in diff[1:]:

        gcd_val = gcd(gcd_val,i)

    print(gcd_val)

else:

    print((diff[0]))
N, X = list(map(int, input().split()))
list = list(map(int, input().split()))
diff = [abs(x - X) for x in list]
diff.sort()


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


# 差の最大公約数を取得
gcd_val = diff[0]
for i in diff[1:]:
    gcd_val = gcd(i, gcd_val)
print(gcd_val)

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


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


if len(diff) >= 2:
    gcd_val = diff[0]
    for i in diff[1:]:
        gcd_val = gcd(gcd_val, i)
    print(gcd_val)
else:
    print((diff[0]))

-diff.sort() -# 差の最大公約数を取得 -gcd_val = diff[0] -for i in diff[1:]: -    gcd_val = gcd(i, gcd_val) -print(gcd_val) +if len(diff) >= 2: +    gcd_val = diff[0] +    for i in diff[1:]: +        gcd_val = gcd(gcd_val, i) +    print(gcd_val) +else: +    print((diff[0]))