#include <iostream>
#include <utility>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <algorithm>
using namespace std;

typedef pair<int,int> pii;
#define x first
#define y second

int main() {
	int m, n;
	while(cin >> m >> n, m || n) {
		int s, t;
		vector<pii> v0, v1;
		cin >> s;
		for(int i = 0; i < s; i++) {
			pii a;
			cin >> a.x >> a.y;
			a.x--; a.y--;
			v0.push_back(a);
		}
		cin >> t;
		for(int i = 0; i < t; i++) {
			pii a;
			cin >> a.x >> a.y;
			a.x--; a.y--;
			v1.push_back(a);
		}

		int ans = 0;
		for(int i = 0; i < v1.size(); i++) {
			v0.push_back(v1[i]);
			int tmp = 0;
			for(int j = 0; j < n; j++) {
				for(int k = 0; k < m; k++) {
					bool valid = true;
					int val = -1;
					int mn = 10000;
					for(int l = 0; l < v0.size(); l++) {
						int h;
						int w;
						h = abs(v0[l].y - j);
						w = fabs((v0[l].x + (v0[l].y % 2) / 2.0) - (k + (j % 2) / 2.0)) - h / 2.0 + 1e-6;
						if(w < 0)
							w = 0;
						if(mn == h + w)
							valid = false;
						else if(mn > h + w) {
							val = l;
							mn = h + w;
							valid = true;
						}
					}
					if(valid && val == v0.size() - 1)
						tmp++;
				}
			}

			ans = max(ans, tmp);
			v0.pop_back();
		}
		cout << ans << endl;
	}
}