#include<bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i <= b; i++)
typedef long long ll;

ll h, w, n, m, a[500010], b[500010], c[100010], d[100010];
ll ans;
int mp[2000][2000];
void run(int T) {
    cin >> h >> w >> n >> m;
    rep(i, 1, n) {
        cin >> a[i] >> b[i];
        mp[a[i]][b[i]] = 3;
        ans++;
    }
    rep(i, 1, m) {
        cin >> c[i] >> d[i];
        mp[c[i]][d[i]] = 2;
    }
    rep(i, 1, n) {
        for(int j = a[i] - 1; j && mp[j][b[i]] < 2; j--) {
            if(!mp[j][b[i]]) ans++;
            mp[j][b[i]] = 1;
        }
        for(int j = a[i] + 1; j <= h && mp[j][b[i]] < 2; j++) {
            if(!mp[j][b[i]]) ans++;
            mp[j][b[i]] = 1;
        }
        for(int j = b[i] - 1; j && mp[a[i]][j] < 2; j--) {
            if(!mp[a[i]][j]) ans++;
            mp[a[i]][j] = 1;
        }
        for(int j = b[i] + 1; j <= w && mp[a[i]][j] < 2; j++) {
            if(!mp[a[i]][j]) ans++;
            mp[a[i]][j] = 1;
        }
    }
    cout << ans << endl;

}
int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(20);
    int T = 1;
    //cin >> T;
    rep(i, 1, T) run(i);
}
#include <bits/stdc++.h>

using namespace std;

const int N = 4e5 + 5;
const int M = 1500 + 10;

const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};

char s[M][M];
int h, w, n, m, mark[M][M];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> h >> w >> n >> m;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            s[i][j] = '.';
        }
    }
    for (int i = 0; i < n; i++) {
        int x, y;
        cin >> x >> y;
        x--, y--;
        s[x][y] = 'L';
        mark[x][y] = 1;
    }
    for (int i = 0; i < m; i++) {
        int x, y;
        cin >> x >> y;
        x--, y--;
        s[x][y] = 'X';
    }
    for (int i = 0; i < h; i++) {
        char now = s[i][0];
        for (int j = 1; j < w; j++) {
            if (s[i][j] == 'X') {
                now = s[i][j];
            }
            if (s[i][j] == 'L') {
                now = s[i][j];
            }
            if (now == 'L') {
                mark[i][j]++;
            }
        }
        now = s[i][w - 1];
        for (int j = w - 2; j >= 0; j--) {
            if (s[i][j] == 'X') {
                now = s[i][j];
            }
            if (s[i][j] == 'L') {
                now = s[i][j];
            }
            if (now == 'L') {
                mark[i][j]++;
            }
        }
    }
    for (int i = 0; i < w; i++) {
        char now = s[0][i];
        for (int j = 1; j < h; j++) {
            if (s[j][i] == 'X') {
                now = s[j][i];
            }
            if (s[j][i] == 'L') {
                now = s[j][i];
            }
            if (now == 'L') {
                mark[j][i]++;
            }
        }
        now = s[h - 1][i];
        for (int j = h - 2; j >= 0; j--) {
            if (s[j][i] == 'X') {
                now = s[j][i];
            }
            if (s[j][i] == 'L') {
                now = s[j][i];
            }
            if (now == 'L') {
                mark[j][i]++;
            }
        }
    }
    int64_t ans = 0;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            ans += (mark[i][j] > 0);
        }
    }
    cout << ans << '\n';
    return 0;
}
