from sys import stdin

import fractions





n,x = [int(x) for x in stdin.readline().rstrip().split()]



li = list(map(int,stdin.readline().rstrip().split()))

lin = []

for i in range(len(li)):

    lin.append(abs(li[i]-x))

poi = lin[0]

for i in range(len(lin)-1):

    poi = fractions.gcd(poi,lin[i+1])



print(poi)
n,x = list(map(int,input().split()))

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

lin = [abs(i-x) for i in li]



from fractions import gcd



now = lin[0]

for i in range(1,n):

    p = gcd(now,lin[i])

    now = p



print(now)
from sys import stdin
import fractions

n, x = [int(x) for x in stdin.readline().rstrip().split()]
li = list(map(int, stdin.readline().rstrip().split()))
lin = []
for i in range(len(li)):
    lin.append(abs(li[i] - x))
poi = lin[0]
for i in range(len(lin) - 1):
    poi = fractions.gcd(poi, lin[i + 1])
print(poi)

n, x = list(map(int, input().split()))
li = list(map(int, input().split()))
lin = [abs(i - x) for i in li]
from fractions import gcd

now = lin[0]
for i in range(1, n):
    p = gcd(now, lin[i])
    now = p
print(now)

-from sys import stdin -import fractions +n, x = list(map(int, input().split())) +li = list(map(int, input().split())) +lin = [abs(i - x) for i in li] +from fractions import gcd -n, x = [int(x) for x in stdin.readline().rstrip().split()] -li = list(map(int, stdin.readline().rstrip().split())) -lin = [] -for i in range(len(li)): -    lin.append(abs(li[i] - x)) -poi = lin[0] -for i in range(len(lin) - 1): -    poi = fractions.gcd(poi, lin[i + 1]) -print(poi) +now = lin[0] +for i in range(1, n): +    p = gcd(now, lin[i]) +    now = p +print(now)