#include <bits/stdc++.h>
using namespace std;
void swap(long long *x, long long *y) {
  long long tema = *x;
  *x = *y;
  *y = tema;
}
long long power(long long x, unsigned long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
signed main() {
  int n, m;
  cin >> n >> m;
  vector<int> c, t;
  map<int, int> fre1;
  map<int, int> fre2;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    if (fre1[temp] == 0) {
      c.push_back(temp);
      fre1[temp]++;
    }
  }
  for (int i = 0; i < m; i++) {
    int temp;
    cin >> temp;
    if (fre2[temp] == 0) {
      t.push_back(temp);
      fre2[temp]++;
    }
  }
  int buf, temp;
  int maxval = 0;
  n = c.size();
  for (int i = 0; i < n; i++) {
    int key = c[i];
    buf = 2 * 1000 * 1000 * 1000 + 1;
    temp = 2 * 1000 * 1000 * 1000 + 1;
    vector<int>::iterator itr1, itr2;
    itr1 = lower_bound(t.begin(), t.end(), key);
    if (itr1 != t.end()) {
      buf = abs(*itr1 - key);
      if (itr1 != t.begin()) {
        itr1--;
        temp = abs(*itr1 - key);
      }
    } else {
      itr1--;
      buf = abs(*itr1 - key);
    }
    maxval = max(min(buf, temp), maxval);
  }
  cout << maxval << "\n";
}
