f=lambda:list(map(int,input().split()))

_,x=f()

m=[abs(i-x) for i in f()]

from fractions import *

a=m.pop()

for i in m: a=gcd(a,i)

print(a)
f=lambda:[*list(map(int,input().split()))]

n,x=f()

l=f()

d=[x-l[0]]

for i in range(n-1):

  d+=[l[i+1]-l[i]]

a=d[0]

from math import *

for i in d:

  a=gcd(a,i)

print(a)
f = lambda: list(map(int, input().split()))
_, x = f()
m = [abs(i - x) for i in f()]
from fractions import *

a = m.pop()
for i in m:
    a = gcd(a, i)
print(a)

f = lambda: [*list(map(int, input().split()))]
n, x = f()
l = f()
d = [x - l[0]]
for i in range(n - 1):
    d += [l[i + 1] - l[i]]
a = d[0]
from math import *

for i in d:
    a = gcd(a, i)
print(a)

-f = lambda: list(map(int, input().split())) -_, x = f() -m = [abs(i - x) for i in f()] -from fractions import * +f = lambda: [*list(map(int, input().split()))] +n, x = f() +l = f() +d = [x - l[0]] +for i in range(n - 1): +    d += [l[i + 1] - l[i]] +a = d[0] +from math import * -a = m.pop() -for i in m: +for i in d: