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 = -float('inf')

ans = 0

for x,l in XL:

    s,t = x-l, x+l

    if s >= right:

        right = t

        ans += 1

print(ans)

N = int(eval(input()))

table = []

for i in range(N):

    X,L = list(map(int,input().split()))

    table.append((X-L,X+L))

table = sorted(table, key=lambda x:x[1])



cur = 0

l_cur, r_cur = table[0]

ans = N

for i in range(1,N):

    l,r = table[i]

    if r_cur > l:

        ans -= 1

    else:

        l_cur, r_cur = l,r

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 = -float("inf")
ans = 0
for x, l in XL:
    s, t = x - l, x + l
    if s >= right:
        right = t
        ans += 1
print(ans)

N = int(eval(input()))
table = []
for i in range(N):
    X, L = list(map(int, input().split()))
    table.append((X - L, X + L))
table = sorted(table, key=lambda x: x[1])
cur = 0
l_cur, r_cur = table[0]
ans = N
for i in range(1, N):
    l, r = table[i]
    if r_cur > l:
        ans -= 1
    else:
        l_cur, r_cur = l, r
print(ans)

-XL = [tuple(map(int, input().split())) for i in range(N)] -XL.sort(key=lambda x: x[0] + x[1]) -right = -float("inf") -ans = 0 -for x, l in XL: -    s, t = x - l, x + l -    if s >= right: -        right = t -        ans += 1 +table = [] +for i in range(N): +    X, L = list(map(int, input().split())) +    table.append((X - L, X + L)) +table = sorted(table, key=lambda x: x[1]) +cur = 0 +l_cur, r_cur = table[0] +ans = N +for i in range(1, N): +    l, r = table[i] +    if r_cur > l: +        ans -= 1 +    else: +        l_cur, r_cur = l, r