//* Problem  : F: Square Count
//* Contest  : ECNA-2005
//* Type     : Solution
//* Date     : 2008.08.04
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <queue>
#include <string>
#include <stack>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

typedef pair <int,int> PIII;
typedef vector <int> VI;
typedef vector <vector<int> > VVI;
typedef vector <pair<int,int> > VPII;
typedef vector <vector<pair<int,int> > > VVPII;

#define int64 long long
#define PI (2.0 * acos(0.0))
#define MP make_pair
#define PB push_back
#define SZ(a) (int)a.size()
#define FOR(i, n) for (int i = 0; i < (int)n; i++)
#define FORSZ(i, a) FOR(i, SZ(a))
#define FORE(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)
#define FORR(i, a, b) for (int i = (int)(a); i >= int(b); i--)
#define INF 1000000000
#define INFL 1000000000000000000LL
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()

inline int si(){int tt; scanf("%d", &tt); return tt;}

int n, m;

int a[1024][1024], res;

int qx[100], qy[100], qc;
int kx[100], ky[100], kc;
int px[100], py[100], pc;

int dxk[] = {-2, -2, -1, -1,  1, 1,  2, 2};
int dyk[] = { 1, -1, -2,  2, -2, 2, -1, 1};

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

void flood(int x, int y)
{
	FOR(k, 8)
	{
		int xx = x + dx[k];
		int yy = y + dy[k];
		while (xx > 0 && yy > 0 && xx <= n && yy <= m && a[xx][yy] >= 0)
		{
			a[xx][yy] = 1;
			xx += dx[k];
			yy += dy[k];
		}
	}
}

void solve()
{
	memset(a, 0, sizeof(a));
	FOR(i, kc)
	{
		int x = kx[i], y = ky[i];
		a[x][y] = -1;
		FOR(k, 8)
		{
			int xx = x + dxk[k];
			int yy = y + dyk[k];
			if (xx >= 0 && yy >= 0)
				if (!a[xx][yy])
					a[xx][yy] = 1;
		}		
	}
	FOR(i, pc)
		a[px[i]][py[i]] = -1;
	FOR(i, qc)
		a[qx[i]][qy[i]] = -1;
	FOR(i, qc)
		flood(qx[i], qy[i]);
	res = 0;
	FORE(i, 1, n)FORE(j, 1, m)
		res += !!a[i][j];
	res = n * m - res;
}

int main()
{
#ifdef _DEBUG
	freopen("1064", "r", stdin);
//	freopen("1064w", "w", stdout);
#endif
	int it = 0;
	while (scanf("%d%d", &n, &m) == 2 && n)
	{
		qc = si();
		FOR(i, qc)
			qx[i] = si(), qy[i] = si();
		kc = si();
		FOR(i, kc)
			kx[i] = si(), ky[i] = si();
		pc = si();
		FOR(i, pc)
			px[i] = si(), py[i] = si();
		solve();
		printf("Board %d has %d safe squares.\n", ++it, res);
	}
	return 0;
}

