#include <iostream>
#include <vector>
#include <unordered_set>
#include <utility>
using namespace std;
int main() {
  int h, w, n, m;
  cin >> h >> w >> n >> m;
  vector<bool> light(h * w, false), block(h * w, false);
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    light.at(a * w + b) = true;
  }
  for (int i = 0; i < m; ++i) {
    int c, d;
    cin >> c >> d;
    --c;
    --d;
    block.at(c * w + d) = true;
  }
  unordered_set<int> ans;
  bool is_shin_f = false, is_shin_r = false;
  for (int i = 0; i < h; ++i) {
    is_shin_f = false, is_shin_r = false;
    for (int j = 0; j < w; ++j) {
      int idx_f = i * w + j, idx_r = i * w + w - j - 1;
      if (light.at(idx_f)) is_shin_f = true;
      if (light.at(idx_r)) is_shin_r = true;
      if (block.at(idx_f)) is_shin_f = false;
      if (block.at(idx_r)) is_shin_r = false;
      if (is_shin_f) ans.insert(idx_f);
      if (is_shin_r) ans.insert(idx_r);
    }
  }
  for (int j = 0; j < w; ++j) {
    is_shin_f = false, is_shin_r = false;
    for (int i = 0; i < h; ++i) {
      int idx_f = i * w + j, idx_r = (h - i - 1) * w + j;
      if (light.at(idx_f)) is_shin_f = true;
      if (light.at(idx_r)) is_shin_r = true;
      if (block.at(idx_f)) is_shin_f = false;
      if (block.at(idx_r)) is_shin_r = false;
      if (is_shin_f) ans.insert(idx_f);
      if (is_shin_r) ans.insert(idx_r);
    }
  }

  cout << ans.size() << endl;
  return 0;
}

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
#define double long double
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
typedef vector<string> VS;
typedef priority_queue<int> PQ;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
#define eps 1e-12 
//priority_queue<int,vector<int>, greater<int> > q2;

int H, W, N, M;
bool vis[1510][1510];
bool L[1510][1510];//光があるか
bool LL[1510][1510];//光があるか
bool B[1510][1510];//ブロックか

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> H >> W >> N >> M;
	REP(i, N) {
		int x, y; cin >> x >> y;
		x--; y--;
		L[x][y] = 1;
		LL[x][y] = 1;
	}
	REP(i, M) {
		int x, y; cin >> x >> y;
		x--; y--;
		B[x][y] = 1;
	}
	int ans = 0;
	REP(i, H) {
		FOR(j, 1, W) {
			if (L[i][j - 1] && !B[i][j]) {
				L[i][j] |= (L[i][j - 1]);
			}
		}
	}
	REP(i, H) {
		for (int j = W - 2; j >= 0; j--) {
			if (L[i][j + 1] && !B[i][j]) {
				L[i][j] |= (L[i][j + 1]);
			}
		}
	}
	FOR(i, 1, H) {
		REP(j, W) {
			if (LL[i - 1][j] && !B[i][j]) {
				LL[i][j] |= (LL[i - 1][j]);
			}
		}
	}
	for (int i = H - 2; i >= 0; i--) {
		REP(j, W) {
			if (LL[i + 1][j] && !B[i][j]) {
				LL[i][j] |= (LL[i + 1][j]);
			}
		}
	}



	REP(i, H)REP(j, W) {
		if (L[i][j] || LL[i][j])ans++;
	}
	cout << ans << endl;




	return 0;
}

