#include<iostream>
#include<vector>
#include<queue>
#include<tuple>
#include<climits>
#include<algorithm>
using namespace std;

enum{X, Y, DEPTH};
typedef tuple<int, int, int> Node;

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

int m, n;
vector<vector<int>> field;

int bfs(int start_x, int start_y, bool write) {
    int result = 0;
    vector<vector<int>> visited(m, vector<int>(n, 0));
    queue<Node> q;
    q.push(Node(start_x, start_y, 0));
    while(!q.empty()) {
        int x = get<X>(q.front());
        int y = get<Y>(q.front());
        int depth = get<DEPTH>(q.front());
        q.pop();
        if(visited[x][y]) continue;
        visited[x][y] = 1;
        if(field[x][y] <= depth) continue;
        if(write) field[x][y] = depth;
        ++result;
        for(int i = 0; i < 6; ++i) {
            int nx = x + dx[y & 1][i];
            int ny = y + dy[y & 1][i];
            if(nx < 0 || m <= nx || ny < 0 || n <= ny) continue;
            q.push(Node(nx, ny, depth + 1));
        }
    }
    return result;
}

int main() {
    int s, t;
    int x, y;
    while(cin >> m >> n, m | n) {
        field = vector<vector<int>>(m, vector<int>(n, INT_MAX));
        for(cin >> s; s > 0; --s) {
            cin >> x >> y;
            bfs(x - 1, y - 1, true);
        }
        int answer = 0;
        for(cin >> t; t > 0; --t) {
            cin >> x >> y;
            answer = max(answer, bfs(x - 1, y - 1, false));
        }
        cout << answer << endl;
    }
}