#include <bits/stdc++.h>
using namespace std;
using ppi = pair<pair<int, int>, int>;
const int NN = 100011;
const int MM = 400011;
int id[NN], LL[MM], RR[MM];
int first[NN], second[NN], xmn[MM], xmx[MM], ymn[MM], ymx[MM];
ppi p[NN];
int n, k;
inline void select(int L, int mid, int R, int *val) {
  R--;
  while (L + 1 <= R) {
    if (L + 1 == R) {
      if (val[id[L]] > val[id[R]]) swap(id[L], id[R]);
      return;
    }
    int S = L + 1, X = S + rand() * rand() % (R - L);
    swap(id[L], id[X]);
    if (val[id[L]] > val[id[R]]) swap(id[L], id[R]);
    if (val[id[L]] > val[id[S]]) swap(id[L], id[S]);
    if (val[id[S]] > val[id[R]]) swap(id[S], id[R]);
    int i = L, j = R, p = val[id[S]];
    while (1) {
      while (i <= R && val[id[i]] <= p) i++;
      while (j >= L && val[id[j]] >= p) j--;
      if (i > j) break;
      swap(id[i], id[j]);
    }
    if (mid <= j)
      R = j;
    else if (mid >= i)
      L = i;
    else
      break;
  }
}
inline void build(int u, int L, int R, int dp = 0) {
  LL[u] = L, RR[u] = R;
  if (L + 1 == R) {
    xmn[u] = xmx[u] = first[id[L]];
    ymn[u] = ymx[u] = second[id[L]];
    return;
  }
  int ls = u << 1, rs = ls | 1, mid = L + R >> 1;
  if (dp)
    select(L, mid, R, first);
  else
    select(L, mid, R, second);
  dp ^= 1;
  build(ls, L, mid, dp);
  build(rs, mid, R, dp);
  xmn[u] = min(xmn[ls], xmn[rs]), xmx[u] = max(xmx[ls], xmx[rs]);
  ymn[u] = min(ymn[ls], ymn[rs]), ymx[u] = max(ymx[ls], ymx[rs]);
}
int xx, xy, yx, yy;
inline bool calc(int u) {
  if (xmn[u] > yx || xmx[u] < xx || ymn[u] > yy || ymx[u] < xy) return false;
  if (xx <= xmn[u] && xmx[u] <= yx && xy <= ymn[u] && ymx[u] <= yy) return true;
  if (LL[u] + 1 == RR[u]) return false;
  return calc((u << 1)) ? true : calc(((u << 1) | 1));
}
inline void smax(int &u, int v) {
  if (u < v) u = v;
}
inline void smin(int &u, int v) {
  if (u > v) u = v;
}
inline int ok(int mid) {
  xx = xy = -1e9;
  yx = yy = 1e9;
  for (int i = 0; i < n; i++) {
    if (xx <= yx and xy <= yy) {
      if (k and p[i].second <= mid) {
        int r = mid - p[i].second;
        xx -= r;
        xy -= r;
        yx += r;
        yy += r;
        if (calc(1)) return true;
        xx += r;
        xy += r;
        yx -= r;
        yy -= r;
      }
    } else
      return false;
    smax(xx, p[i].first.first - mid);
    smin(yx, p[i].first.first + mid);
    smax(xy, p[i].first.second - mid);
    smin(yy, p[i].first.second + mid);
  }
  return xx <= yx and xy <= yy;
}
int solve() {
  cin >> n >> k;
  if (n == 1) return puts("0");
  for (int i = 0; i < n; i++) {
    int first, second;
    scanf("%d %d", &first, &second);
    p[i].first.first = first + second;
    p[i].first.second = first - second;
  }
  for (int i = 0; i < k; i++) {
    int first, second;
    scanf("%d %d", &first, &second);
    ::first[i] = first + second;
    ::second[i] = first - second;
    id[i] = i;
  }
  if (k) {
    build(1, 0, k);
    for (int i = 0; i < n; i++) {
      int st = -1, ed = 1e9;
      while (ed > st + 1) {
        int mid = st + ed >> 1;
        xx = p[i].first.first - mid;
        xy = p[i].first.second - mid;
        yx = p[i].first.first + mid;
        yy = p[i].first.second + mid;
        if (calc(1))
          ed = mid;
        else
          st = mid;
      }
      p[i].second = ed;
    }
  }
  sort(p, p + n, [&](ppi u, ppi v) { return u.second > v.second; });
  int st = -1, ed = 1e9;
  while (ed > st + 1) {
    int mid = st + ed >> 1;
    if (ok(mid))
      ed = mid;
    else
      st = mid;
  }
  cout << ed << endl;
}
int main() {
  srand(time(0));
  solve();
  return 0;
}
