#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define pb push_back
#define eb emplace_back
#define sz size
#define ALL(v) v.begin(),v.end()
const long long INF = 1LL << 60;
using namespace std;
using ll = long long;
using P = pair<int, int>;
using LP = pair<ll, ll>;
using P3 = tuple<int, int, int>;
#define vi vector<int>
#define vvi vector<vi>
#define vll vector<ll>
#define vs vector<string>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main()
{
    int h, w, n, m;
    cin >> h >> w >> n >> m;
    vvi g(h, vi(w, 0));
    vector<P> p;
    rep(i, n){
        int a, b;
        cin >> a >> b;
        --a; --b;
       // g[a][b] = 1;
        p.eb(a, b);
    }
    rep(i, m){
        int a, b;
        cin >> a >> b;
        --a; --b;
        g[a][b] = -1;
    }
    //tate
    rep(i, n){
        int x = p[i].first;
        int y = p[i].second;
        if(!(g[x][y] &1)){
            rep2(xi, x+1, h){
                if(g[xi][y] == -1) break;
                if((g[xi][y] &1)) break;
                g[xi][y] = 1;
            }
            for(int xi = x-1; xi>=0 ; xi--){
                if(g[xi][y] == -1) break;
                if((g[xi][y] &1)) break;
                g[xi][y] = 1;
            }
        }
        if(!(g[x][y] &2)){
            rep2(yi, y+1, w){
                if(g[x][yi] == -1) break;
                if((g[x][yi] &2)) break;
                g[x][yi] = 2;
            }
            for(int yi = y-1; yi>=0 ; yi--){
                if(g[x][yi] == -1) break;
                if((g[x][yi] &2)) break;
                g[x][yi] = 2;
            }
        }
        g[x][y] = 3;
    }
    int ans = 0;
    rep(i, h)rep(j, w){
        if(g[i][j] > 0) ++ans;
    }
    cout << ans << endl;

   
    
    return 0;
}
#include <bits/stdc++.h>
// #include <atcoder/all>
// #include "icld.cpp"
using namespace std;
using ll = long long int;
using vi = vector<int>;
using si = set<int>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using ss = string;
using db = double;
template<typename T> using minpq = priority_queue <T,vector<T>,greater<T>>;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
#define V vector
#define P pair<int,int>
#define PLL pair<ll,ll>
#define rep(i,s,n) for(int i=(s);i<(int)(n);i++)
#define rev(i,s,n) for(int i=(s);i>=(int)(n);i--)
#define reciv(v,n) vi (v)((n)); rep(i,0,(n))cin>>v[i]
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ci(x) cin >> x
#define cii(x) ll x;cin >> x
#define cci(x,y) ll x,y;cin >> x >> y
#define co(x) cout << x << endl
#define pb push_back
#define eb emplace_back
#define rz resize
#define pu push
#define sz(x) int(x.size())
#define vij v[i][j]
// ll p = 1e9+7;
// ll p = 998244353;
// n do -> n*pi/180
#define yn cout<<"Yes"<<endl;else cout<<"No"<<endl
#define YN cout<<"YES"<<endl;else cout<<"NO"<<endl
template<class T>void chmax(T &x,T y){x=max(x,y);}
template<class T>void chmin(T &x,T y){x=min(x,y);}

int main(){
  cci(h,w);
  vvi v(h+2,vi(w+2,-1));
  rep(i,1,h+1){
      rep(j,1,w+1)vij=0;
  }
  cci(n,m);

  vvi lt(n,vi(2)),bl(m,vi(2));
  rep(i,0,n){
      rep(j,0,2)ci(lt[i][j]);
  }
  rep(i,0,m){
      rep(j,0,2)ci(bl[i][j]);
      v[bl[i][0]][bl[i][1]]=-1;
  }

    vvi tt=v,yk=v;
  rep(i,0,n){
      int x=lt[i][0];
      int y=lt[i][1];

      int nx=x,ny=y;
      tt[x][y]=yk[x][y]=1;
      while(tt[nx-1][y]==0)tt[--nx][y]=1;
      while(yk[x][ny-1]==0)yk[x][--ny]=1;

      nx=x,ny=y;
      while(tt[nx+1][y]==0)tt[++nx][y]=1;
      while(yk[x][ny+1]==0)yk[x][++ny]=1;
    }
/*
  rep(i,2,h+1){
      rep(j,1,w+1){
          if(yk[i][j]==-1)continue;
          chmax(yk[i][j],yk[i-1][j]);
      }
  }

  rep(i,2,w+1){
      rep(j,1,h+1){
          if(tt[j][i]==-1)continue;
          chmax(tt[j][i],tt[j][i-1]);
      }
  }
*/
    int ans=0;
    rep(i,1,h+1){
        rep(j,1,w+1){
            if(yk[i][j]==1 or tt[i][j]==1){
                // cout<<1<<" ";
                ans++;
            }
            // else if(vij==-1)cout<<'x'<<" ";
            // else cout<<0<<" ";
        }
        // co("");
    }

    co(ans);
}