// Never gonna give you up
// Never gonna let you down
// Never gonna run around and desert you
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define watch(x) cout <<(#x)<<" is "<<(x)<<endl
#define debug cout <<"hi"<<endl
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MOD=1e9+7;
const int INF32=1<<30;
const ll INF64=1LL<<60;
const ld pi=acos(-1);
ll gcd(ll a, ll b) {return (!b?a:gcd(b,a%b));}
ll lcm(ll a, ll b) {return a*b/gcd(a,b);}
ll mul(ll a, ll b) {return a*b%MOD;}
ll modpow(ll b, ll i){
  ll s=1;
  while(i){
    if(i%2) s=(s*b)%MOD;
    b=(b*b)%MOD; i/=2;
  }
  return s;
}
ll inv(ll a) {return modpow(a,MOD-2);}

void solve(){
  int h,w,n,m; cin >>h >>w >>n >>m;
  int a[h][w],cnt=0; memset(a,-1,sizeof(a));
  while(n--){int x,y; cin >>x >>y; a[x-1][y-1]=1;}
  while(m--){int x,y; cin >>x >>y; a[x-1][y-1]=0;}
  for(int i=0; i<h; i++) for(int j=0; j<w; j++) if(a[i][j]==1){
    for(int k=i-1; k>=0; k--){if(a[k][j]==-1||a[k][j]==2) a[k][j]=2; else break;}
    for(int k=i+1; k<h; k++){if(a[k][j]==-1||a[k][j]==2) a[k][j]=2; else break;}
    for(int k=j-1; k>=0; k--){if(a[i][k]==-1||a[i][k]==2) a[i][k]=2; else break;}
    for(int k=j+1; k<w; k++){if(a[i][k]==-1||a[i][k]==2) a[i][k]=2; else break;}
  }
  for(int i=0; i<h; i++) for(int j=0; j<w; j++) if(a[i][j]>0) cnt++;
  cout <<cnt;
}

int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  solve();
  return 0;}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
const ll M = 1e18;
int si[] = {-1, 0, 1, 0};
int sj[] = {0, -1, 0, 1};

int main(){
  int h, w, n, m;
  cin >> h >> w >> n >> m;
  vector<vector<int>> v(h, vector<int>(w,0));
  rep(i,n){
    int a,b;
    cin >> a >> b;
    a--; b--;
    v[a][b] = 1;
  }
  rep(i,m){
    int c,d;
    cin >> c >> d;
    c--; d--;
    v[c][d] = -1;
  }

  vector<vector<int>> x(h,vector<int>(w,0));

  for(int i = 0; i < h; i++){
    bool flag = false;
    for(int j = 0; j < w; j++){
      if(v[i][j] == 1) flag = true;
      else if(v[i][j] == -1) flag = false;
      if(flag) x[i][j]++;
    }
  }
  for(int i = 0; i < h; i++){
    bool flag = false;
    for(int j = w-1; j >= 0; j--){
      if(v[i][j] == 1) flag = true;
      else if(v[i][j] == -1) flag = false;
      if(flag) x[i][j]++;
    }
  }

  for(int j = 0; j < w; j++){
    bool flag = false;
    for(int i = 0; i < h; i++){
      if(v[i][j] == 1) flag = true;
      else if(v[i][j] == -1) flag = false;
      if(flag) x[i][j]++;
    }
  }

  for(int j = 0; j < w; j++){
    bool flag = false;
    for(int i = h-1; i >= 0; i--){
      if(v[i][j] == 1) flag = true;
      else if(v[i][j] == -1) flag = false;
      if(flag) x[i][j]++;
    }
  }

  int ans = 0;
  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(x[i][j] != 0) ans++;
    }
  }
  cout << ans << endl;

  return 0;
}
