#include <iostream>
#include <utility>
#include <stdlib.h>
using namespace std;

int cal(int x1,int y1,int x2,int y2) {
	int d,x,y;
	if (y1==y2) return abs(x1-x2);
	if (x1==x2) return abs(y1-y2);
	if (x1>x2) { swap(x1,x2); swap(y1,y2);}
	d= y1<y2 ? 0 : 1;
	if ((d==0 && (y2 % 2)==1 && y2+1==y1) || (d==1 && (y1 % 2)==1 && y1+1==y2)) x=0; else x=x2-x1;
	y=abs(y2-y1)/2;
	if (abs(y2-y1) % 2 == 1) if (y2 % 2==0) y++;
	if (x>y) x=y;
	d=abs(x1-x2)+abs(y1-y2)-x;
	return d;
}

int main() {
    int a,c,m,n,s,p,k,x,y,i,j,mp[100][100];
    while(cin >> m >> n && m>0) {
	  for (i=0;i<n;i++) for (j=0;j<m;j++) mp[i][j]=999;
	  a=0;
	  for (p=0;p<2;p++) {
	  cin >> s; 
	  for (;s>0;s--) {
		   cin >> x >> y; k=0; x--; y--;
	       for (i=0;i<n;i++) for (j=0;j<m;j++) {
			   c=cal(x,y,j,i);
	       if (mp[i][j]>c) { if (p==0) mp[i][j]=c; else k++; }
	       }
	       if (a<k) a=k;
		}
	}
	cout << a << endl;
	}
	 return 0;
}