#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
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);
  rep(i,a)cin>>d[i].first>>d[i].second;
  rep(i,b)cin>>e[i].first>>d[i].second;
  rep(i,a){
    long int f=LONG_MAX,g;
    rep(o,b){
      g=ads(d[i].first-e[o].first)+ads(d[i].second-e[o].second);
      f=min(g,f);
    }
    c+=f;
  }
  cout<<c;
}
