#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4, M = 1e9 + 7;
const double PI = acos(-1), eps = 1e-9;
int n, m;
vector<int> f, s;
int a;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a;
    f.push_back(a);
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    s.push_back(a);
  }
  int sol = -1;
  for (int i = 0; i < n; i++) {
    auto ind = upper_bound(s.begin(), s.end(), f[i]);
    int ans = 2e9;
    if (ind != s.begin()) {
      ind--;
      ans = min(abs(f[i] - *ind), ans);
      ind++;
    }
    if (ind != s.end()) ans = min(abs(f[i] - *ind), ans);
    sol = max(ans, sol);
  }
  cout << sol << '\n';
  return 0;
}
