from numpy import*

from functools import*

from fractions import*

n,X,*x=list(map(int,open(0).read().split()))

print((reduce(gcd,list(abs(array(x)-X)))))
from fractions import*

from functools import*

n,x,*a=list(map(int,open(0).read().split()))



print((reduce(gcd,[abs(x-i) for i in a])))
from numpy import *
from functools import *
from fractions import *

n, X, *x = list(map(int, open(0).read().split()))
print((reduce(gcd, list(abs(array(x) - X)))))

from fractions import *
from functools import *

n, x, *a = list(map(int, open(0).read().split()))
print((reduce(gcd, [abs(x - i) for i in a])))

-from numpy import * +from fractions import * -from fractions import * -n, X, *x = list(map(int, open(0).read().split())) -print((reduce(gcd, list(abs(array(x) - X))))) +n, x, *a = list(map(int, open(0).read().split())) +print((reduce(gcd, [abs(x - i) for i in a])))