from bisect import bisect_left from collections import deque N,M = map(int,input().split()) S = list(map(int,input().split())) S = sorted(S) T = list(map(int,input().split())) ans = 0 high = M+1 low = 0 while high-low>1: mid = (high+low)//2 T1 = sorted(T[:mid]) S1 = deque(S[:]) a = 0 flag = True for i in range(mid): x = T1[i] ind = bisect_left(S1,x) if ind==len(S1): flag = False break else: a = max(a,abs(S1[ind]-x)) for j in range(ind+1): S1.popleft() if flag: ans = a low = mid else: high = mid print(ans)