import std.stdio;
import std.container;
import std.functional;
import std.algorithm;

struct P {
    int y, x;
    int t;
}

void dump(int[][] x) {
    foreach (l; x) {
        l.writeln;
    }
    writeln;
}

void calcDist(int[][] F, int y, int x) {
    auto Y = F.length,
         X = F[0].length;
    foreach (i; 0 .. Y) 
        foreach (j; 0 .. X)
            F[i][j] = int.max;
    static const oD = [
        [-1, 0], [-1, 1],
        [0, -1], [0, 1],
        [1, 0], [1, 1]
    ];
    static const eD = [
        [-1, -1], [-1, 0],
        [0, -1], [0, 1],
        [1, -1], [1, 0]
    ];
    DList!P Q;
    Q.insert(P(y, x, 0)); 
    F[y][x] = 0;
    while (!Q.empty) {
        P cur = Q.front; Q.removeFront;
        foreach (d; (cur.y % 2 == 0 ? eD : oD)) {
            int ny = cur.y + d[0],
                nx = cur.x + d[1];
            if (ny < 0 || ny >= Y) continue;
            if (nx < 0 || nx >= X) continue;
            if (F[ny][nx] <= cur.t + 1) continue;
            F[ny][nx] = cur.t + 1;
            Q.insert(P(ny, nx, cur.t + 1));
        }
    }
}

void main() {
    int m, n;
    int s, t;
    while (readf("%d", &m), m) {
        readf(" %d\n", &n);
        readf("%d\n", &s);
        auto S = new int[][][](s, n, m);
        foreach (i; 0 .. s) {
            int x, y; readf("%d %d\n", &x, &y);
            y--; x--;
            calcDist(S[i], y, x);
        }
        readf("%d\n", &t);
        auto T = new int[][](n, m);
        int[] R = new int[t];
        int count() {
            int c = 0;
            foreach (i; 0 .. n) {
                foreach (j; 0 .. m) {
                    foreach (k; 0 .. s) {
                        if (T[i][j] >= S[k][i][j]) 
                            goto next;
                    }
                    c++;
next:;
                }
            }
            return c;
        }
        foreach (i; 0 .. t) {
            int x, y; readf("%d %d\n", &x, &y);
            y--; x--;
            calcDist(T, y, x);
            R[i] = count;
        }
        R.reduce!max.writeln;
        delete(S);
        delete(T);
        delete(R);
    }
}