#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int MOD = 1000000007;
const int UNDEF = -1;
const int INF = INT_MAX - 50;
template <typename T>
inline bool chkmax(T &aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T &aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
class wavelet_tree {
 public:
  int lo, hi;
  wavelet_tree *l, *r;
  vector<int> b;
  wavelet_tree() {}
  wavelet_tree(int *from, int *to, int x, int y) { init(from, to, x, y); }
  void init(int *from, int *to, int x, int y) {
    lo = x, hi = y;
    if (lo == hi or from >= to) return;
    int mid = (lo + hi) / 2;
    auto f = [mid](int x) { return x <= mid; };
    b.reserve(to - from + 1);
    b.push_back(0);
    for (auto it = from; it != to; it++) b.push_back(b.back() + f(*it));
    auto pivot = stable_partition(from, to, f);
    l = new wavelet_tree(from, pivot, lo, mid);
    r = new wavelet_tree(pivot, to, mid + 1, hi);
  }
  int _kth(int l, int r, int k) {
    if (l > r) return 0;
    if (lo == hi) return lo;
    int inLeft = b[r] - b[l - 1];
    int lb = b[l - 1];
    int rb = b[r];
    if (k <= inLeft) return this->l->_kth(lb + 1, rb, k);
    return this->r->_kth(l - lb, r - rb, k - inLeft);
  }
  int kth(int l, int r, int k) { return _kth(l + 1, r + 1, k); }
  int _MINGTE(int l, int r, int k) {
    if (l > r) return INF;
    if (hi < k) return INF;
    if (lo == hi) return lo;
    int inLeft = b[r] - b[l - 1];
    int lb = b[l - 1];
    int rb = b[r];
    int got = this->l->_MINGTE(lb + 1, rb, k);
    if (got < INF) return got;
    return this->r->_MINGTE(l - lb, r - rb, k);
  }
  int MINGTE(int l, int r, int k) { return _MINGTE(l + 1, r + 1, k); }
  int _LTE(int l, int r, int k) {
    if (l > r or k < lo) return 0;
    if (hi <= k) return r - l + 1;
    int lb = b[l - 1], rb = b[r];
    return this->l->_LTE(lb + 1, rb, k) + this->r->_LTE(l - lb, r - rb, k);
  }
  int LTE(int l, int r, int k) { return _LTE(l + 1, r + 1, k); }
  int _GTE(int l, int r, int k) {
    if (l > r or k > hi) return 0;
    if (lo >= k) return r - l + 1;
    int lb = b[l - 1], rb = b[r];
    return this->l->_GTE(lb + 1, rb, k) + this->r->_GTE(l - lb, r - rb, k);
  }
  int GTE(int l, int r, int k) { return _GTE(l + 1, r + 1, k); }
  int _count(int l, int r, int k) {
    if (l > r or k < lo or k > hi) return 0;
    if (lo == hi) return r - l + 1;
    int lb = b[l - 1], rb = b[r], mid = (lo + hi) / 2;
    if (k <= mid) return this->l->_count(lb + 1, rb, k);
    return this->r->_count(l - lb, r - rb, k);
  }
  int count(int l, int r, int k) { return _count(l + 1, r + 1, k); }
};
int rint();
char rch();
long long rlong();
const int mn = 1e5 + 4;
pair<int, int> vp[2][mn];
int gn, gk;
const int D = 0, S = 1;
int getxle(int x) {
  int imin = 0, imax = gk;
  while (imin < imax) {
    int imid = (imin + imax) >> 1;
    if (vp[S][imid].first < x)
      imin = imid + 1;
    else
      imax = imid;
  }
  return imin;
}
const int MAXO = 1e8 + 4;
const int MAXC = 4 * MAXO;
vector<pair<int, int> > s2i;
int gdistmax = 0;
int tmpb[mn];
wavelet_tree T;
void sub() {
  const int MIN = 0;
  int n = gn, k = gk;
  vector<int> vx;
  for (int i = 0; i < k; i++) vx.push_back(vp[S][i].first);
  for (int i = 0; i < k; i++) tmpb[i] = vp[S][i].second;
  T.init(tmpb, tmpb + k, MIN, MAXC);
  s2i.reserve(n);
  for (int i = 0; i < n; i++) {
    int px = vp[D][i].first, py = vp[D][i].second;
    int imin = 0, imax = MAXC;
    while (imin < imax) {
      int imid = (imin + imax) / 2;
      int xl = getxle(px - imid), xr = getxle(px + imid + 1) - 1;
      int yl = max(MIN, py - imid), yr = py + imid;
      int goty = T.MINGTE(xl, xr, yl);
      if (goty > yr)
        imin = imid + 1;
      else
        imax = imid;
    }
    s2i.push_back(make_pair(imin, i));
    chkmax(gdistmax, imin);
  }
  sort(s2i.begin(), s2i.end(), greater<pair<int, int> >());
}
bool f(int h) {
  if (h >= gdistmax) return true;
  int oxl = -INF, oxh = INF, oyl = -INF, oyh = INF;
  int lasts = gdistmax;
  for (auto &w : s2i) {
    int s = w.first;
    int i = w.second;
    if (s != lasts) {
      int d = h - s;
      if (d >= 0) {
        int xl = oxl - d, xh = oxh + d;
        int yl = oyl - d, yh = oyh + d;
        int ygot = T.MINGTE(getxle(xl), getxle(xh + 1) - 1, yl);
        if (ygot <= yh) return true;
      }
      lasts = s;
    }
    int x = vp[D][i].first, y = vp[D][i].second;
    int d = h;
    chkmax(oxl, x - d);
    chkmin(oxh, x + d);
    chkmax(oyl, y - d);
    chkmin(oyh, y + d);
    if (!(oxl <= oxh && oyl <= oyh)) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  gn = rint();
  gk = rint();
  int n = gn, k = gk;
  for (int i = 0; i < n; i++) {
    int px = rint(), py = rint();
    int x = px - py + 2 * MAXO;
    int y = py + px + 2 * MAXO;
    vp[D][i] = make_pair(x, y);
  }
  for (int i = 0; i < k; i++) {
    int px = rint(), py = rint();
    int x = px - py + 2 * MAXO;
    int y = py + px + 2 * MAXO;
    vp[S][i] = make_pair(x, y);
  }
  sort(vp[S], vp[S] + k);
  sub();
  int imin = 0, imax = (MAXO + MAXO) + 4;
  while (imin < imax) {
    int imid = (imin + imax) >> 1;
    bool got = f(imid);
    if (!got)
      imin = imid + 1;
    else
      imax = imid;
  }
  printf("%d\n", imin);
}
static char stdinBuffer[1024];
static char *stdinDataEnd = stdinBuffer + sizeof(stdinBuffer);
static const char *stdinPos = stdinDataEnd;
void readAhead(size_t amount) {
  size_t remaining = stdinDataEnd - stdinPos;
  if (remaining < amount) {
    memmove(stdinBuffer, stdinPos, remaining);
    size_t sz = fread(stdinBuffer + remaining, 1,
                      sizeof(stdinBuffer) - remaining, stdin);
    stdinPos = stdinBuffer;
    stdinDataEnd = stdinBuffer + remaining + sz;
    if (stdinDataEnd != stdinBuffer + sizeof(stdinBuffer)) *stdinDataEnd = 0;
  }
}
int rint() {
  readAhead(16);
  int x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
