#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define ll long long
#define rep(i,n) for(int i = 0; i < int(n); i++)
#define vi vector<int>
using namespace std;
const int INF = 1001001001;
const int MOD = 1e9+7;
template<class T> inline bool chmax(T &a, const T &b){ if(a<b){ a=b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b){ if(b<a){ a=b; return 1; } return 0; }

int main(){
  cin.tie(0), ios::sync_with_stdio(false);
  int h,w,n,m; cin >> h >> w >> n >> m;
  set<pair<int,int>> block;
  vector<vi> l(h,vi(w)), r(h,vi(w)), u(h,vi(w)), d(h,vi(w));
  rep(i,n){
    int a,b; cin >> a >> b;
    --a; --b;
    l[a][b] = 1;
    r[a][b] = 1;
    u[a][b] = 1;
    d[a][b] = 1;
  }
  rep(i,m){
    int c,d; cin >> c >> d;
    block.insert({--c,--d});
  }
  rep(i,h){
    rep(j,w-1){
      if(block.count({i,j+1})) continue;
      r[i][j+1] |= r[i][j];
    }
  }
  rep(i,h){
    for(int j = w-1; 0 < j; j--){
      if(block.count({i,j-1})) continue;
      l[i][j-1] |= l[i][j];
    }
  }
  rep(j,w){
    rep(i,h-1){
      if(block.count({i+1,j})) continue;
      d[i+1][j] |= d[i][j];
    }
  }
  rep(j,w){
    for(int i = h-1; 0 < i; i--){
      if(block.count({i-1,j})) continue;
      u[i-1][j] |= u[i][j];
    }
  }
  int ans = 0;
  rep(i,h) rep(j,w) ans += u[i][j]|d[i][j]|r[i][j]|l[i][j];
  cout << ans;
  cout << endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define Go_ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long int
#define llu long long unsigned int
#define pii pair<int ,int>
#define PII pair<ll ,ll>

const int Max=1e9+100;
const ll  MAX=1e18+500;
const int sz=1510;

bool vist[sz][sz];
int mark[sz][sz];


int main()
{
    Go_
    int a,b,c,i,j,k,q,p,x,y,ct,ct1,m,l,r,x1,y1,mn,h,sum1,in,z,mid,n,mx;
    char ch;
    double d;
    string str1,str2,str;
    bool bl,bl1;
    int t,cs=1;
    
    cin>>n>>m>>a>>b;

    memset(mark, 0, sizeof mark);

    pii light[a];

    for(int i=0;i<a;i++) cin>>light[i].first>>light[i].second;
    
    ct=0;
    for(int i=1;i<=b;i++){
        cin>>x>>y;
        mark[x][y]=-1;
    }

    for(int i=0;i<a;i++)
    {
        int x, y;
        x=light[i].first, y=light[i].second;
        if(vist[x][y]==false) ++ct;
        vist[x][y]=true;

        j=y;
        while(j<=m && mark[x][j] != -1){
            if(vist[x][j]==false) ++ct;
            vist[x][j]=true;
            ++j;
        }
        
        j=y;
        while(j>0 && mark[x][j] != -1){
            if(vist[x][j]==false) ++ct;
            vist[x][j]=true;
            --j;
        }
        
        j=x;
        while(j<=n && mark[j][y] != -1){
            if(vist[j][y]==false) ++ct;
            vist[j][y]=true;
            ++j;
        }
        
        j=x;
        while(j>=1 && mark[j][y] != -1){
            if(vist[j][y]==false) ++ct;
            vist[j][y]=true;
            --j;
        }

        mark[x][y]=-1;
    }

    cout<<ct<<'\n';

}
