while 1:

	n = int(input())

	if n == 0:

		break

	w,h = list(map(int,input().split(" ")))

	field = [[0 for i in range(0,w+1)] for j in range(0,h+1)]

	for i in range(n):

		x,y = list(map(int,input().split(" ")))

		field[y][x] = 1

	s,t = list(map(int,input().split(" ")))

	tree_max = 0

	for i in range(1,w-s+2):

		for j in range(1,h-t+2):

			tmp_sum = 0

			for k in range(i,i+s):

				for l in range(j,j+t):

					tmp_sum += field[l][k]	

			tree_max = max(tree_max, tmp_sum)



	print(tree_max)
while 1:

	n = int(input())

	if n == 0:

		break

	w,h = list(map(int,input().split(" ")))

	tree_loc = [list(map(int,input().split(" "))) for i in range(n)]

	s,t = list(map(int,input().split(" ")))

	get_field = [[0 for i in range(0,w-s+2)] for j in range(0,h-t+2)] 

	for x,y in tree_loc:

		get_field[max(y-t+1,1)][max(x-s+1,1)] += 1

		if y + 1 <= h - t + 1:

			get_field[y+1][max(x-s+1,1)] -= 1

		if x + 1 <= w - s + 1:

			get_field[max(y-t+1,1)][x+1] -= 1

		if y + 1 <= h - t + 1 and x + 1 <= w - s + 1:

			get_field[y+1][x+1] += 1



	for i in range(1,w-s+1):

		for j in range(1,h-t+2):

			get_field[j][i+1] += get_field[j][i]	

	for j in range(1,h-t+1):

		for i in range(1,w-s+2):

			get_field[j+1][i] += get_field[j][i]



	tree_max = max([max(get_field[j]) for j in range(1,h-t+2)])

	print(tree_max)
while 1:
    n = int(input())
    if n == 0:
        break
    w, h = list(map(int, input().split(" ")))
    field = [[0 for i in range(0, w + 1)] for j in range(0, h + 1)]
    for i in range(n):
        x, y = list(map(int, input().split(" ")))
        field[y][x] = 1
    s, t = list(map(int, input().split(" ")))
    tree_max = 0
    for i in range(1, w - s + 2):
        for j in range(1, h - t + 2):
            tmp_sum = 0
            for k in range(i, i + s):
                for l in range(j, j + t):
                    tmp_sum += field[l][k]
            tree_max = max(tree_max, tmp_sum)
    print(tree_max)

while 1:
    n = int(input())
    if n == 0:
        break
    w, h = list(map(int, input().split(" ")))
    tree_loc = [list(map(int, input().split(" "))) for i in range(n)]
    s, t = list(map(int, input().split(" ")))
    get_field = [[0 for i in range(0, w - s + 2)] for j in range(0, h - t + 2)]
    for x, y in tree_loc:
        get_field[max(y - t + 1, 1)][max(x - s + 1, 1)] += 1
        if y + 1 <= h - t + 1:
            get_field[y + 1][max(x - s + 1, 1)] -= 1
        if x + 1 <= w - s + 1:
            get_field[max(y - t + 1, 1)][x + 1] -= 1
        if y + 1 <= h - t + 1 and x + 1 <= w - s + 1:
            get_field[y + 1][x + 1] += 1
    for i in range(1, w - s + 1):
        for j in range(1, h - t + 2):
            get_field[j][i + 1] += get_field[j][i]
    for j in range(1, h - t + 1):
        for i in range(1, w - s + 2):
            get_field[j + 1][i] += get_field[j][i]
    tree_max = max([max(get_field[j]) for j in range(1, h - t + 2)])
    print(tree_max)

-    field = [[0 for i in range(0, w + 1)] for j in range(0, h + 1)] -    for i in range(n): -        x, y = list(map(int, input().split(" "))) -        field[y][x] = 1 +    tree_loc = [list(map(int, input().split(" "))) for i in range(n)] -    tree_max = 0 -    for i in range(1, w - s + 2): +    get_field = [[0 for i in range(0, w - s + 2)] for j in range(0, h - t + 2)] +    for x, y in tree_loc: +        get_field[max(y - t + 1, 1)][max(x - s + 1, 1)] += 1 +        if y + 1 <= h - t + 1: +            get_field[y + 1][max(x - s + 1, 1)] -= 1 +        if x + 1 <= w - s + 1: +            get_field[max(y - t + 1, 1)][x + 1] -= 1 +        if y + 1 <= h - t + 1 and x + 1 <= w - s + 1: +            get_field[y + 1][x + 1] += 1 +    for i in range(1, w - s + 1): -            tmp_sum = 0 -            for k in range(i, i + s): -                for l in range(j, j + t): -                    tmp_sum += field[l][k] -            tree_max = max(tree_max, tmp_sum) +            get_field[j][i + 1] += get_field[j][i] +    for j in range(1, h - t + 1): +        for i in range(1, w - s + 2): +            get_field[j + 1][i] += get_field[j][i] +    tree_max = max([max(get_field[j]) for j in range(1, h - t + 2)])