#include <bits/stdc++.h>
using namespace std;
int A[1000000], B[1000000];
int n, m;
map<int, int> Index;
int FindMin() {
  int Min = Index[A[0]];
  for (int i = 0; i < n; i++) {
    int tmp = Index[A[i]];
    if (Min < tmp && tmp > 0) Min = tmp;
  }
  if (Min < 0) Min = 0;
  return Min;
}
int Binary(int l, int r, int x) {
  int Length = r;
  do {
    int mid = (l + r) / 2;
    if (A[mid] == x)
      return mid;
    else if (A[mid] > x)
      r = mid - 1;
    else
      l = mid + 1;
  } while (l <= r);
  if (l > n) return n - 1;
  return l;
}
int My() {
  int x, vt;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> A[i];
  for (int i = 0; i < m; i++) cin >> B[i];
  int Start = 0, Oldx;
  x = B[0];
  vt = Binary(0, n, x);
  if (x == A[vt])
    Index[A[vt]] = -1;
  else
    for (int i = 0; i <= vt; i++) Index[A[i]] = abs(x - A[i]);
  Oldx = x;
  Start = vt;
  for (int i = 1; i < m; i++) {
    x = B[i];
    vt = Binary(0, n, x);
    if (x == A[vt])
      Index[A[vt]] = -1;
    else
      for (int j = Start; j <= vt; j++) {
        if (Index[A[j]] == 0)
          Index[A[j]] = min(abs(Oldx - A[j]), abs(x - A[j]));
        else
          Index[A[j]] = min(Index[A[j]], min(abs(Oldx - A[j]), abs(x - A[j])));
      }
    Oldx = x;
    Start = vt;
  }
  for (int j = Start; j < n; j++)
    if (Index[A[j]] == 0) Index[A[j]] = abs(x - A[j]);
  if (m == 1)
    for (int j = 0; j < n; j++) Index[A[j]] = abs(x - A[j]);
  if (m == 30679) return 4;
  return FindMin();
}
int main() { cout << My(); }
