#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long NICE = 69;
int main() {
  long long gur, gurgur, gur_gur = 0, gurgurgur;
  cin >> gur >> gurgur;
  vector<long long> gurr(gur), gur_, gur_gur_;
  gur_.push_back(-100000000000);
  for (long long gurrgurrrr = 0; gurrgurrrr < gur; gurrgurrrr++)
    cin >> gurr[gurrgurrrr];
  for (long long gurrgurrrr = 0; gurrgurrrr < gurgur; gurrgurrrr++) {
    cin >> gurgurgur;
    gur_.push_back(gurgurgur);
  }
  gur_.push_back(100000000000);
  for (long long gurrgurrrr = gurgur + 1; gurrgurrrr >= 0; gurrgurrrr--)
    gur_gur_.push_back(-gur_[gurrgurrrr]);
  for (auto gurrgurrrr : gurr)
    gur_gur =
        max(min(*lower_bound(gur_.begin(), gur_.end(), gurrgurrrr) - gurrgurrrr,
                *lower_bound(gur_gur_.begin(), gur_gur_.end(), -gurrgurrrr) +
                    gurrgurrrr),
            gur_gur);
  cout << gur_gur;
}
