#include <iostream>
#include <vector>
#include <queue>
using namespace std;

int H, W, N, M, p[100], q[100], x, y, dist[109][109][11]; vector<pair<int, int>> X[109][109];
int dy1[6] = { 0,0,-1,-1,1,1 }, dx1[6] = { -1,1,-1,0,-1,0 };
int dy2[6] = { 0,0,-1,-1,1,1 }, dx2[6] = { -1,1,0,1,0,1 };

int solve() {
	for (int i = 1; i <= H; i++) { for (int j = 1; j <= W; j++) { for (int k = 0; k <= N; k++) dist[i][j][k] = (1 << 30); } }
	for (int i = 0; i <= N; i++) {
		queue<pair<int, int>>Q;
		Q.push(make_pair(p[i], q[i])); dist[p[i]][q[i]][i] = 0;
		while (!Q.empty()) {
			int to1 = Q.front().first, to2 = Q.front().second; Q.pop();
			for (int j = 0; j < X[to1][to2].size(); j++) {
				int p1 = X[to1][to2][j].first, p2 = X[to1][to2][j].second;
				if (dist[p1][p2][i] > dist[to1][to2][i] + 1) {
					dist[p1][p2][i] = dist[to1][to2][i] + 1;
					Q.push(make_pair(p1, p2));
				}
			}
		}
	}
	int ans = 0;
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			bool OK = true;
			for (int k = 1; k <= N; k++) {
				if (dist[i][j][0] >= dist[i][j][k]) OK = false;
			}
			if (OK == true) ans++;
		}
	}
	return ans;
}

int main() {
	while (true) {
		cin >> H >> W; if (H == 0) break;
		for (int i = 0; i < 109; i++) { for (int j = 0; j < 109; j++) X[i][j].clear(); }
		for (int i = 1; i <= H; i++) {
			for (int j = 1; j <= W; j++) {
				for (int k = 0; k < 6; k++) {
					int fx = i, fy = j;
					if (j % 2 == 1) { fx += dx1[k]; fy += dy1[k]; }
					if (j % 2 == 0) { fx += dx2[k]; fy += dy2[k]; }
					if (fx <= 0 || fy <= 0 || fx > H || fy > W) continue;
					X[i][j].push_back(make_pair(fx, fy));
				}
			}
		}
		cin >> N;
		for (int i = 1; i <= N; i++) { cin >> p[i] >> q[i]; }
		int ret = 0;
		cin >> M;
		for (int i = 1; i <= M; i++) {
			cin >> x >> y;
			p[0] = x; q[0] = y;
			ret = max(ret, solve());
		}
		cout << ret << endl;
	}
	return 0;
}
