#include <bits/stdc++.h>
using namespace std;

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

int n, m;
int g[200][200];
int grid[200][200];
int grid2[200][200];

bool ok(int i, int j)
{
	return i >= 0 && j >= 0 && i < n && j < m;
}

int solve()
{
	int maxi = 0;
	memcpy(grid, g, sizeof(g));
	for (int a = 0; a < 200; a++){
		memset(grid2, 0, sizeof(grid2));
		for (int i = 0; i < n; i++){
			for (int j = 0; j < m; j++){
				for (int dir = 0; dir < 7; dir++){
					int nx = i + dx[dir];
					int ny = j + dy[i % 2][dir];
					if (!ok(nx, ny)) continue;
					grid2[nx][ny] |= grid[i][j];
				}
			}
		}
		
		int cnt = 0;
		for (int i = 0; i < n; i++){
			for (int j = 0; j < m; j++){
				if (grid2[i][j] == (grid2[i][j] & (-grid2[i][j]))){
					grid[i][j] = grid2[i][j];
					if (grid[i][j] == 1) cnt++;
				}
				//printf("%d ", grid[i][j]);
			}
			//puts("");
		}
		maxi = max(maxi, cnt);
	}
	return maxi;
}

int main()
{
	while (scanf("%d %d", &m, &n), m){
		memset(g, 0, sizeof(g));
		int maxi = 0;
		int s;
		scanf("%d", &s);
		for (int i = 0; i < s; i++){
			int x, y;
			scanf("%d %d", &x, &y);
			g[--x][--y] = 1 << i + 1;
		}
		int t;
		scanf("%d", &t);
		for (int i = 0; i < t; i++){
			int p, q;
			scanf("%d %d", &p, &q);
			if (g[--p][--q]) continue;
			g[p][q] = 1;
			int tmp = solve();
			maxi = max(maxi, tmp);
			g[p][q] = 0;
		}
		printf("%d\n", maxi);
	}
	
	return 0;
}