#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 1001001001;
const int mod = 1000000007;


// rotation 90 degrees
vvi rot(vvi orginal,int h,int w){
    vvi v(w,vi(h));
    for(int i = 0;i < h;i++){
        for(int j = 0; j < w;j++){
            v.at(w-j-1).at(i) = orginal.at(i).at(j);
        }
    }
    return v;
}

int main(){
    int h,w,n,m;
    cin >> h >> w >> n >> m;
    vvi mas(h,vi(w,0));
    vvi received(h,vi(w,0));
    rep(i,n){
        int a,b;
        cin >> a >> b;
        a--;b--;
        mas.at(a).at(b) = 1; 
    }
    rep(i,m){
        int c,d;
        cin >> c >> d;
        c--;d--;
        mas.at(c).at(d) = 2; 
    }
    rep(i,4){
        rep(j,h){
            bool f = false;
            rep(k,w){
                if(mas.at(j).at(k) == 2){
                    f = false;
                    continue;
                }
                if(mas.at(j).at(k) == 1){
                    f = true;
                    received.at(j).at(k) = 1;
                    continue;
                }
                if(f) received.at(j).at(k) = 1;
            }
        }
        // cout << "h:" << h << endl;
        // cout << "w:" << w << endl;
        mas = rot(mas,h,w);
        received = rot(received,h,w);
        swap(h,w);
    }
    ll ans = 0;
    rep(i,h)rep(j,w) if (received.at(i).at(j)) ans++;
    cout << ans << endl; 

}
#include <iostream>
using namespace std;
 
int main() {
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<a*d-b*c<<endl;
	return 0;
}