#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
 
int main() {
ll H,W,N,M;
  cin>>H>>W>>N>>M;
  
  vector<vector<ll>> vec(H,vector<ll> (W,0));
  
 
  for(ll i=0;i<N;i++) {
ll A,B;
    cin>>A>>B;
 A--;
    B--;
    vec[A][B]=1;
  }
 
  for(ll i=0;i<M;i++) {
ll C,D;
    cin>>C>>D;
    C--;
    D--;
    vec[C][D]=2;
  }
  
  
  vector<vector<bool>> note(H,vector<bool> (W,false));
  ll ans=0;
  
  for(ll i=0;i<W;i++) {
ll count=0;
    
    for(ll j=0;j<H;j++) {
      if(vec[j][i]==0) {
        if(count<=0) {
count--;
        }
        else {
count++;
      }
      }
      
      else if(vec[j][i]==1) {
        if(count<=0) {
count*=-1;
        }
        count++;
      }
      
        
        else {
if(count<=0) {
count=0;
}
          else {
            ans+=count;
            for(ll h=j-count;h<j;h++) {
              note[h][i]=true;
            }
            count=0;
          }
        }
        
      
       if(j==H-1&&count>0) {
         ans+=count;
for(ll h=j-count+1;h<=j;h++) {
note[h][i]=true;
}
       }
      
      }
      
      
  }
      
      for(ll i=0;i<H;i++) {
ll count=0;
        for(ll j=0;j<W;j++) {

          
  
  
  
  
  if(vec[i][j]==0) {
if(count<=0) {
count--;
}
    else {
count++;
    }
  }
          else if(vec[i][j]==1) {
if(count<=0) {
count*=-1;
}
            count++;
          }
          
          
          else {
if(count<=0) {
count=0;
}
            else {
ans+=count;
              for(ll h=j-count;h<j;h++) {
if(note[i][h]) {
ans--;
}
              }
              count=0;
            }
          }
            
            if(count>0&&j==W-1) {
ans+=count;
              for(ll h=j-count+1;h<=j;h++) {
if(note[i][h]) {
ans--;
}
              }
              
            }
          
          
          }
        }
        
        cout<<ans<<endl;
      }
             
  
  
  
  
  

  
#include <bits/stdc++.h>
using namespace std;
#define testing 1
#define FOR(ii,ss,ee) for (ll ii = (ss); ii<=(ll)(ee);++ii)
#define DEC(ii,ss,ee) for (ll ii = (ss); ii>=(ll)(ee);--ii)
#define IAMSPEED ios_base::sync_with_stdio(false); cin.tie(0);
#define db(x) cerr << #x << '=' << x << endl
#define db2(a,b) cerr << #a << "=" << a << " , " << #b << "=" << b << endl
#define dbv(v) cerr << #v << ":"; for (auto it : v) cerr << it << ' '; cerr << endl
#define dba(a,ss,ee) cerr #a << ":"; FOR(i,ss,ee) cerr << a[i] << ' '; cerr << endl
#define ll long long
#define pb push_back
#define inf (int)1e9
#define oo (ll)1e18
#define all(x) (x).begin(), (x).end()
#define f first
#define s second
#define reach cerr << "endl\n";
typedef pair<int,int> pi;
typedef tuple<int,int,int> ti3;
const int MOD = 1e9+7;
template<typename T> void maxself(T &a, T b) {
	a = max(a,b);
}
template <typename T> void minself(T & a, T b) {
	a = min(a,b);
}

#define MAXN
#if !testing
	#define cerr if(0)cout
#endif
int bulb,block;
int32_t main() {
	IAMSPEED
	int n,m; cin >> n >> m >> bulb >> block;
	char A[n+5][m+5];
	int a[n+5][m+5], b[n+5][m+5], c[n+5][m+5], d[n+5][m+5];
	FOR(i,1,n)FOR(j,1,m)A[i][j]='x';
	memset(a,0,sizeof a);
	memset(b,0,sizeof b);
	memset(c,0,sizeof c);
	memset(d,0,sizeof d);
	FOR(i,1,bulb) {
		int x,y; cin >> x >> y;
		A[x][y] = '.';
	}
	FOR(i,1,block) {
		int x,y; cin >> x >> y;
		A[x][y]='#';
	}
	FOR(i,1,n) {
		a[i][1] = A[i][1]=='.';
		FOR(j,2,m) {
			a[i][j] = a[i][j-1];
			if(A[i][j]=='.')a[i][j]=1;
			if (A[i][j] == '#') a[i][j] = 0;
		}
	}
	FOR(i,1,m) {
		b[1][i] = A[1][i]=='.';
		FOR(j,2,n) {
			b[j][i] = b[j-1][i];
			if(A[j][i]=='.')b[j][i]=1;
			if (A[j][i]=='#') b[j][i] = 0;
		}
	}
	FOR(i,1,n) {
		c[i][m] = A[i][m]=='.';
		DEC(j,m-1,1) {
			c[i][j] = c[i][j+1];
			if(A[i][j]=='.')c[i][j]=1;
			if (A[i][j]=='#')c[i][j]=0;
		}
	}
	FOR(i,1,m) {
		d[n][i] = A[n][i]=='.';
		DEC(j,n-1,1) {
			d[j][i] = d[j+1][i];
			if(A[j][i]=='.')d[j][i]=1;
			if (A[j][i]=='#')d[j][i]=0;
		}
	}
	ll ans = 0;
	FOR(i,1,n) {
		FOR(j,1,m) {
			//db2(i,j);
			//db2(a[i][j],b[i][j]);
			//db2(c[i][j],d[i][j]);
			ans += !!max({a[i][j],b[i][j],c[i][j],d[i][j]});
		}
	}
	cout << ans;
	
}
/*
1 5

*/
