N = int(eval(input()))

R = sorted([list(map(int, input().split())) for i in range(N)])

T = []

for i in range(N):

    T.append([R[i][0] + R[i][1], R[i][0] - R[i][1]])

T.sort(reverse=True)

while len(T) - 1 > 0:

    t = T.pop()

    i = 1

    while len(T) and t[0] > T[-1][1]:

        N -= 1

        i += 1

        T.pop()

print(N)
N = int(eval(input()))

XL = [list(map(int, input().split())) for _ in range(N)]

A = []

for x, l in XL:

    A.append([x + l, x - l])

A.sort()

B = []

i = 0

while True:

    B.append(A[i])

    if i == N - 1:

        break

    j = 1

    while True:

        if A[i][0] > A[i + j][1]:

            j += 1

            if i + j == N:

                break

            continue

        else:

            break

    if i + j == N:

        break

    i = i + j

print((len(B)))
N = int(eval(input()))
R = sorted([list(map(int, input().split())) for i in range(N)])
T = []
for i in range(N):
    T.append([R[i][0] + R[i][1], R[i][0] - R[i][1]])
T.sort(reverse=True)
while len(T) - 1 > 0:
    t = T.pop()
    i = 1
    while len(T) and t[0] > T[-1][1]:
        N -= 1
        i += 1
        T.pop()
print(N)

N = int(eval(input()))
XL = [list(map(int, input().split())) for _ in range(N)]
A = []
for x, l in XL:
    A.append([x + l, x - l])
A.sort()
B = []
i = 0
while True:
    B.append(A[i])
    if i == N - 1:
        break
    j = 1
    while True:
        if A[i][0] > A[i + j][1]:
            j += 1
            if i + j == N:
                break
            continue
        else:
            break
    if i + j == N:
        break
    i = i + j
print((len(B)))

-R = sorted([list(map(int, input().split())) for i in range(N)]) -T = [] -for i in range(N): -    T.append([R[i][0] + R[i][1], R[i][0] - R[i][1]]) -T.sort(reverse=True) -while len(T) - 1 > 0: -    t = T.pop() -    i = 1 -    while len(T) and t[0] > T[-1][1]: -        N -= 1 -        i += 1 -        T.pop() -print(N) +XL = [list(map(int, input().split())) for _ in range(N)] +A = [] +for x, l in XL: +    A.append([x + l, x - l]) +A.sort() +B = [] +i = 0 +while True: +    B.append(A[i]) +    if i == N - 1: +        break +    j = 1 +    while True: +        if A[i][0] > A[i + j][1]: +            j += 1 +            if i + j == N: +                break +            continue +        else: +            break +    if i + j == N: +        break +    i = i + j +print((len(B)))