#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long p[1000100];
long long c[1000100];
long long binSearch(long long x) {
  long long s = 0;
  long long e = m - 1;
  long long mid;
  long long res = 10000000000000LL;
  while (s <= e) {
    mid = (s + e) / 2;
    if (p[mid] == x) return 0;
    if (p[mid] > x) {
      res = min(res, p[mid] - x);
      e = mid - 1;
    } else {
      res = min(res, x - p[mid]);
      s = mid + 1;
    }
  }
  return res;
}
int main() {
  scanf("%I64d %I64d", &n, &m);
  for (long long i = 0; i < n; i++) scanf("%I64d", &c[i]);
  sort(c, c + n);
  for (long long i = 0; i < m; i++) scanf("%I64d", &p[i]);
  sort(p, p + m);
  long long res = 0;
  for (long long i = 0; i < n; i++) {
    res = max(res, binSearch(c[i]));
  }
  cout << res << endl;
  return 0;
}
