n = int(eval(input()))

ll = []

for i in range(n):

  x, l = list(map(int, input().split()))

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

ll = sorted(ll)



ans = n

r = ll.pop()[0]



while ll:

  while ll and ll[-1][1] > r:

    ans -= 1

    ll.pop()

  if ll:

    r = ll.pop()[0]



print(ans)
n = int(eval(input()))

ll = []

for i in range(n):

  x, l = list(map(int, input().split()))

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

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



ans = 0

tmp = -10**9



for s, t in ll:

  if s >= tmp:

    ans += 1

    tmp = t



print(ans)
n = int(eval(input()))
ll = []
for i in range(n):
    x, l = list(map(int, input().split()))
    ll.append([x - l, x + l])
ll = sorted(ll)
ans = n
r = ll.pop()[0]
while ll:
    while ll and ll[-1][1] > r:
        ans -= 1
        ll.pop()
    if ll:
        r = ll.pop()[0]
print(ans)

n = int(eval(input()))
ll = []
for i in range(n):
    x, l = list(map(int, input().split()))
    ll.append([x - l, x + l])
ll = sorted(ll, key=lambda x: x[1])
ans = 0
tmp = -(10**9)
for s, t in ll:
    if s >= tmp:
        ans += 1
        tmp = t
print(ans)

-ll = sorted(ll) -ans = n -r = ll.pop()[0] -while ll: -    while ll and ll[-1][1] > r: -        ans -= 1 -        ll.pop() -    if ll: -        r = ll.pop()[0] +ll = sorted(ll, key=lambda x: x[1]) +ans = 0 +tmp = -(10**9) +for s, t in ll: +    if s >= tmp: +        ans += 1 +        tmp = t