#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline void smin(A &a, const B &b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void smax(A &a, const B &b) {
  if (a < b) a = b;
}
int id[100100], LL[400400], RR[400400];
int first[100100], second[100100], xmn[400400], xmx[400400], ymn[400400],
    ymx[400400];
inline void select(int L, int mid, int R, int *val) {
  R--;
  int i, j, p, S, X;
  while (L + 1 <= R) {
    if (L + 1 == R) {
      if (val[id[L]] > val[id[R]]) swap(id[L], id[R]);
      return;
    }
    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]);
    i = L, j = R, p = val[id[S]];
    while (true) {
      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]);
}
pair<pair<int, int>, int> p[100100];
int X, Y, mn;
inline bool find(int u) {
  int L = LL[u], R = RR[u];
  if (R - L <= 2) {
    for (int i = L; i < R; i++) {
      smin(mn, max(abs(X - first[id[i]]), abs(Y - second[id[i]])));
    }
    return true;
  }
  int ls = u << 1;
  if (find(ls)) return true;
  return find(ls | 1);
}
inline void calc(int u) {
  int x_x = 0, y_y = 0;
  if (X > xmx[u]) x_x = X - xmx[u];
  if (X < xmn[u]) x_x = xmn[u] - X;
  if (Y > ymx[u]) y_y = Y - ymx[u];
  if (Y < ymn[u]) y_y = ymn[u] - Y;
  if (max(x_x, y_y) > mn) return;
  int L = LL[u], R = RR[u];
  if (L + 1 == R) {
    smin(mn, max(abs(X - first[id[L]]), abs(Y - second[id[L]])));
    return;
  }
  int ls = u << 1;
  calc(ls), calc(ls | 1);
}
int n, k, ax, ay, bx, by;
inline bool in(int u) {
  if (bx < xmn[u] || xmx[u] < ax || by < ymn[u] || ymx[u] < ay) return false;
  if (ax <= xmn[u] && xmx[u] <= bx && ay <= ymn[u] && ymx[u] <= by) return true;
  if (LL[u] + 1 == RR[u]) return false;
  int ls = u << 1;
  if (in(ls)) return true;
  return in(ls | 1);
}
inline bool can(int d) {
  ax = ay = -0x3f3f3f3f, bx = by = 0x3f3f3f3f;
  for (int i = 1; i <= n; i++) {
    if (ax <= bx && ay <= by) {
      if (k && p[i].second <= d) {
        int T = d - p[i].second;
        ax -= T, ay -= T, bx += T, by += T;
        if (in(1)) return true;
        ax += T, ay += T, bx -= T, by -= T;
      }
    } else
      return false;
    X = p[i].first.first, Y = p[i].first.second;
    smax(ax, X - d), smin(bx, X + d);
    smax(ay, Y - d), smin(by, Y + d);
  }
  return ax <= bx && ay <= by;
}
int main() {
  srand(time(0));
  scanf("%d %d", &n, &k);
  for (int i = 1, first, second; i <= n; i++) {
    scanf("%d %d", &first, &second);
    p[i].first = {first - second, first + second};
  }
  if (k) {
    for (int i = 1, first, second; i <= k; i++) {
      scanf("%d %d", &first, &second);
      ::first[i] = first - second, ::second[i] = first + second, id[i] = i;
    }
    build(1, 1, k + 1);
    for (int i = 1; i <= n; i++) {
      mn = 0x3f3f3f3f;
      X = p[i].first.first, Y = p[i].first.second;
      int st = -1, ed = 400000000;
      while (ed - st > 1) {
        int md = st + ed >> 1;
        ax = X - md, ay = Y - md, bx = X + md, by = Y + md;
        if (in(1))
          ed = md;
        else
          st = md;
      }
      p[i].second = ed;
    }
    sort(p + 1, p + n + 1,
         [](pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) {
           return a.second > b.second;
         });
  }
  int st = -1, ed = 200000000;
  while (ed - st > 1) {
    int md = st + ed >> 1;
    if (can(md))
      ed = md;
    else
      st = md;
  }
  printf("%d", ed);
}
