#include <bits/stdc++.h>
using namespace std;
int main() {
  long int a, b, c = 0;
  cin >> a >> b;
  vector<pair<long int, long int>> d(a);
  vector<pair<long int, long int>> e(b);
  for (int i = 0; i < (int)(a); ++i) cin >> d[i].first >> d[i].second;
  for (int i = 0; i < (int)(b); ++i) cin >> e[i].first >> d[i].second;
  for (int i = 0; i < (int)(a); ++i) {
    long int f = LONG_MAX, g;
    for (int o = 0; o < (int)(b); ++o) {
      g = fabs(d[i].first - e[o].first) + fabs(d[i].second - e[o].second);
      f = min(g, f);
    }
    c += f;
  }
  cout << c;
}
