#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cassert>
#include<vector>
#include<deque>
using namespace std;
typedef pair<int,int> P;
int n,m,s,cnt;
int Cost[110][110];
int mincost[110][110];
bool visited[110][110];
int dx[2][6] = {{-1,+0,1,0,-1,-1},{+0,+1,1,1,0,-1}};
int dy[2][6] = {{-1,-1,0,1,+1,+0},{-1,-1,0,1,1,+0}};

void dfs(int x,int y,int cost)
{
  for(int i=0;i<6;i++)
    {
      int nx = x + dx[y%2][i];
      int ny = y + dy[y%2][i];
      if(!(0 <= nx && nx < m && 0 <= ny && ny < n))
	continue;

      if(Cost[ny][nx] > cost)
	{
	  Cost[ny][nx] = cost;
	  dfs(nx,ny,cost+1);
	}
    }
}

void dfs2(int x,int y,int cost)
{
  for(int i=0;i<6;i++)
    {
      int nx = x + dx[y%2][i];
      int ny = y + dy[y%2][i];
   
      if(!(0 <= nx && nx < m && 0 <= ny && ny < n))
	continue;

      if(mincost[ny][nx] <= cost || Cost[ny][nx] <= cost)
	continue;    

      mincost[ny][nx] = cost;
      if(!visited[ny][nx])
	cnt++;
	  visited[ny][nx] = true;
	  dfs2(nx,ny,cost+1);
	  
    }

}

int main()
{
  while(true)
    {
      cin >> n;
      if(!n)
	break;
      cin >> m;
    
      for(int i=0;i<10000000;i++);
      scanf("%d",&s);

	for(int j=0;j<n;j++)
	  for(int k=0;k<m;k++)
	    Cost[j][k] = (1<<29);
      
      for(int i=0;i<s;i++)
	{
	  int x,y;
	  scanf("%d %d",&x,&y);
	  x--,y--;
	  Cost[y][x] = 0;
	  dfs(x,y,1);
	}

      int t;
      scanf("%d",&t);

      int mex = 0;
      for(int i=0;i<t;i++)
	{
	  int p,q;
	  scanf("%d %d",&p,&q);
	  cnt = 1;
	  p--,q--;
	  
	  for(int j=0;j<n;j++)
	    for(int k=0;k<m;k++)
	      mincost[j][k] = (1<<29),visited[j][k] = false;
	  mincost[q][p] = 0;
	  visited[q][p] = true;
	  dfs2(p,q,1);
	  
	  mex = max(mex,cnt);
	}
      cout << mex << endl;

    }
  return 0;
}