#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int mod = 1e9 + 7;
int a[100030], b[100030], c[100030 * 3];
int aa[100030], bb[100030];
int ha[100030 * 2], hb[100030 * 2];
long long d[100030 * 3];
int huifu[100030 * 3];
int main() {
  int n, m;
  cin >> n >> m;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    c[cnt++] = a[i];
  }
  for (int j = 0; j < m; j++) {
    scanf("%d", &b[j]);
    c[cnt++] = b[j];
  }
  memset(d, 0x3f, sizeof(d));
  sort(c, c + cnt);
  cnt = unique(c, c + cnt) - c;
  for (int i = 0; i < n; i++) {
    aa[i] = lower_bound(c, c + cnt, a[i]) - c + 1;
    ha[aa[i]]++;
    huifu[aa[i]] = a[i];
  }
  for (int i = 0; i < m; i++) {
    bb[i] = lower_bound(c, c + cnt, b[i]) - c + 1;
    hb[bb[i]]++;
    huifu[bb[i]] = b[i];
  }
  long long ans = 0;
  long long l = 0x3f3f3f3f * 0x3f3f3f3f;
  bool ok = 0;
  for (int i = 0; i < 100030 * 2; i++) {
    if (hb[i]) {
      l = huifu[i];
      ok = 1;
    }
    if (ha[i]) {
      if (ok) {
        d[i] = min(d[i], huifu[i] - l);
      }
    }
  }
  long long r = -0x3f3f3f3f * 0x3f3f3f3f;
  ok = 0;
  for (int i = 100030 * 2 - 1; i >= 0; i--) {
    if (hb[i]) {
      r = huifu[i];
      ok = 1;
    }
    if (ha[i]) {
      if (ok) {
        d[i] = min(r - huifu[i], d[i]);
      }
    }
  }
  for (int i = 0; i < 100030 * 2; i++) {
    if (ha[i]) {
      ans = max(ans, d[i]);
    }
  }
  cout << ans << endl;
  return 0;
}
