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

n,x=f()

l=f()

d=[l[i+1]-l[i] for i in range(n-1)]

a=abs(x-l[0])

from math import *

for i in d:

  a=gcd(a,i)

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

n,x=f()

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

a=d.pop()

from math import *

for i in d:

  a=gcd(a,i)

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

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

f = lambda: [*list(map(int, input().split()))]
n, x = f()
d = [abs(i - x) for i in f()]
a = d.pop()
from math import *

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

-l = f() -d = [l[i + 1] - l[i] for i in range(n - 1)] -a = abs(x - l[0]) +d = [abs(i - x) for i in f()] +a = d.pop()