N = int(eval(input()))

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

XL.sort(key=lambda x: x[0]+x[1])



right = -10**9

removed = 0

for x, l in XL:

    if x-l < right:

        removed += 1

    else:

        right = x+l

print((N-removed))

N = int(eval(input()))

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



XL.sort(key=lambda x: x[0] + x[1])

ans = 0

prev = - 10**9

for x, l in XL:

    if prev <= x - l:

        ans += 1

        prev = x + l



print(ans)

N = int(eval(input()))
XL = [tuple(map(int, input().split())) for i in range(N)]
XL.sort(key=lambda x: x[0] + x[1])
right = -(10**9)
removed = 0
for x, l in XL:
    if x - l < right:
        removed += 1
    else:
        right = x + l
print((N - removed))

N = int(eval(input()))
XL = [tuple(map(int, input().split())) for i in range(N)]
XL.sort(key=lambda x: x[0] + x[1])
ans = 0
prev = -(10**9)
for x, l in XL:
    if prev <= x - l:
        ans += 1
        prev = x + l
print(ans)

-right = -(10**9) -removed = 0 +ans = 0 +prev = -(10**9) -    if x - l < right: -        removed += 1 -    else: -        right = x + l -print((N - removed)) +    if prev <= x - l: +        ans += 1 +        prev = x + l +print(ans)