import fractions

from functools import reduce

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

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

subx = []

for i in range(N):

  subx.append(abs(listx[i] - X))

  

def lcm_list(numbers):

    return reduce(fractions.gcd, numbers)



ans = lcm_list(subx)



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

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

subx = []



for i in range(N):

  subx.append(abs(listx[i] - X))

if N == 1:

  subx.append(subx[0])



def gcd(a,b):

  if a < b:

    a, b = b, a

  while a % b != 0:

    a, b = b, a % b

  return b



ans = gcd(subx[0], subx[1])



if N > 2:

  for i in range(2, N):

    ans = gcd(ans, subx[i])

  

print(ans)
import fractions
from functools import reduce

N, X = list(map(int, input().split()))
listx = list(map(int, input().split()))
subx = []
for i in range(N):
    subx.append(abs(listx[i] - X))


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


ans = lcm_list(subx)
print(ans)

N, X = list(map(int, input().split()))
listx = list(map(int, input().split()))
subx = []
for i in range(N):
    subx.append(abs(listx[i] - X))
if N == 1:
    subx.append(subx[0])


def gcd(a, b):
    if a < b:
        a, b = b, a
    while a % b != 0:
        a, b = b, a % b
    return b


ans = gcd(subx[0], subx[1])
if N > 2:
    for i in range(2, N):
        ans = gcd(ans, subx[i])
print(ans)

-import fractions -from functools import reduce - +if N == 1: +    subx.append(subx[0]) -def lcm_list(numbers): -    return reduce(fractions.gcd, numbers) +def gcd(a, b): +    if a < b: +        a, b = b, a +    while a % b != 0: +        a, b = b, a % b +    return b -ans = lcm_list(subx) +ans = gcd(subx[0], subx[1]) +if N > 2: +    for i in range(2, N): +        ans = gcd(ans, subx[i])