#include <bits/stdc++.h>
using namespace std;
int n, m;
long long a[100005], b[100005], c[100005], d[100005];
long long l, r, mid, dis;
bool make(long long mid) {
  int x = 1, y = 1;
  while (x <= n && y <= m) {
    if (d[y] + mid >= c[x] && d[y] - mid <= c[x]) {
      x++;
      continue;
    }
    if (d[y] - mid > c[x]) return 0;
    y++;
  }
  if (x == n + 1) return 1;
  if (y == m + 1) return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (i == 1) {
      l = a[i];
      r = a[i];
      continue;
    }
    l = min(l, a[i]);
    r = max(r, a[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%lld", &b[i]);
    l = min(l, b[i]);
    r = max(r, b[i]);
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  if (a[1] <= b[1]) {
    c[1] = 0;
    for (int i = 2; i <= n; i++) c[i] = a[i] - a[1];
    for (int i = 1; i <= m; i++) d[i] = b[i] - a[1];
  } else {
    d[1] = 0;
    for (int i = 1; i <= n; i++) c[i] = a[i] - b[1];
    for (int i = 2; i <= m; i++) d[i] = b[i] - b[1];
  }
  r = r - l;
  l = 0;
  while (l < r) {
    mid = (l + r) / 2;
    if (make(mid) == 1)
      r = mid;
    else
      l = mid + 1;
  }
  printf("%lld", l);
}
