#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
//#include <cctype>
#include <cstring>
//#include <ctime>
#include <iterator>
#include <bitset>
//#include <numeric>
//#include <list>
//#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;
int h,w;
int dx1[]={0,-1,1,0,1,-1};
int dy1[]={-1,0,0,1,1,1};
int dx2[]={-1,0,1,1,0,-1};
int dy2[]={0,1,0,-1,-1,-1};
int dy[6][2];
int dx[6][2];
void mainmain(){
	rep(i,6){
		dy[i][0]=dy1[i];
		dx[i][0]=dx1[i];
	}
	rep(i,6){
		dy[i][1]=dy2[i];
		dx[i][1]=dx2[i];
	}
	while(cin>>w>>h,h||w){
		// cout<<h<<" "<<w<<endl;
		queue<pair<pii,int>> q1;
		vvint table;
		initvv(table,h,w,-1);
		int n;
		cin>>n;
		rep(i,n){
			pii a;
			cin>>a.S>>a.F;
			a.F--;
			a.S--;
			// cout<<a.F<<" "<<a.S<<endl;
			q1.push(mkp(a,0));
		}
		while(!q1.empty()){
			pair<pii,int> top=q1.front();
			q1.pop();
			if(table[top.F.F][top.F.S]!=-1){
				continue;
			}
			table[top.F.F][top.F.S]=top.S;
			rep(i,6){
				pii next=top.F;
				int t=1&top.F.F;
				t=1-t;
				next.F+=dx[i][t];
				next.S+=dy[i][t];
				if(0<=next.F&&next.F<h&&0<=next.S&&next.S<w){
					q1.push(mkp(next,top.S+1));
				}
			}
		}
		// rep(i,h){
			// if(i&1) cout<<" ";
			// rep(j,w){
				// cout<<table[i][j]<<" ";	
			// }
			// cout<<endl;
		// }
		int m;
		cin>>m;
		vvint used;
		int ans=0;
		rep(i,m){
			pii a;
			initvv(used,h,w,0);
			cin>>a.S>>a.F;
			a.F--;
			a.S--;
			// continue;
			queue<pair<pii,int>> q2;
			q2.push(mkp(a,0));
			int tmp=0;
			// cout<<i<<"----------"<<endl;
			while(!q2.empty()){
				pair<pii,int> top=q2.front();
				q2.pop();
				if(used[top.F.F][top.F.S]) continue;
				if(table[top.F.F][top.F.S]<=top.S) continue;
				// cout<<top.F.F<<" "<<top.F.S<<" "<<top.S<<" "<<table[top.F.F][top.F.S]<<endl;
				tmp++;
				used[top.F.F][top.F.S]=1;
				rep(i,6){
					pii next=top.F;
					int t=1&top.F.F;
					t=1-t;
					next.F+=dx[i][t];
					next.S+=dy[i][t];
					if(0<=next.F&&next.F<h&&0<=next.S&&next.S<w){
						q2.push(mkp(next,top.S+1));
					} 
				}
			}
			ans=max(ans,tmp);
		}
		cout<<ans<<endl;
	}
}



}
main() try{
    mainmain();
}
catch(...){
}

Measured memory_bytes: 1248