n = int(eval(input()))

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



lr = []

for i in range(n):

    l = max(xl[i][0] - xl[i][1], 0)

    r = max(xl[i][0] + xl[i][1], 0)

    lr.append([r, l])



lr = sorted(lr)

keep = [False] * n

# print(lr)



cur = 0

for i in range(n):

    if cur <= lr[i][1]:

        keep[i] = True

        cur = lr[i][0]

'''

for j in range(n - 1):

    if keep[j]:

        if lr[j][0] == lr[j + 1][0]:

            keep[j + 1] = False

        elif lr[j][0] < lr[j + 1][0]:# < lr[j][1]:

            keep[j + 1] = False

'''

#print(keep)

ans = sum(1 for x in range(n) if keep[x])

print(ans)

n = int(eval(input()))

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



lr = []

for i in range(n):

    l = max(xl[i][0] - xl[i][1], 0)

    r = max(xl[i][0] + xl[i][1], 0)

    lr.append([l, r])



lr.sort(key=lambda x: x[1])

keep = [False] * n





cur = 0

for i in range(n):

    if cur <= lr[i][0]:

        keep[i] = True

        cur = lr[i][1]



ans = sum(keep)

print(ans)

n = int(eval(input()))
xl = [list(map(int, input().split())) for _ in range(n)]
lr = []
for i in range(n):
    l = max(xl[i][0] - xl[i][1], 0)
    r = max(xl[i][0] + xl[i][1], 0)
    lr.append([r, l])
lr = sorted(lr)
keep = [False] * n
# print(lr)
cur = 0
for i in range(n):
    if cur <= lr[i][1]:
        keep[i] = True
        cur = lr[i][0]
"""
for j in range(n - 1):
    if keep[j]:
        if lr[j][0] == lr[j + 1][0]:
            keep[j + 1] = False
        elif lr[j][0] < lr[j + 1][0]:# < lr[j][1]:
            keep[j + 1] = False
"""
# print(keep)
ans = sum(1 for x in range(n) if keep[x])
print(ans)

n = int(eval(input()))
xl = [list(map(int, input().split())) for _ in range(n)]
lr = []
for i in range(n):
    l = max(xl[i][0] - xl[i][1], 0)
    r = max(xl[i][0] + xl[i][1], 0)
    lr.append([l, r])
lr.sort(key=lambda x: x[1])
keep = [False] * n
cur = 0
for i in range(n):
    if cur <= lr[i][0]:
        keep[i] = True
        cur = lr[i][1]
ans = sum(keep)
print(ans)

-    lr.append([r, l]) -lr = sorted(lr) +    lr.append([l, r]) +lr.sort(key=lambda x: x[1]) -# print(lr) -    if cur <= lr[i][1]: +    if cur <= lr[i][0]: -        cur = lr[i][0] -""" -for j in range(n - 1): -    if keep[j]: -        if lr[j][0] == lr[j + 1][0]: -            keep[j + 1] = False -        elif lr[j][0] < lr[j + 1][0]:# < lr[j][1]: -            keep[j + 1] = False -""" -# print(keep) -ans = sum(1 for x in range(n) if keep[x]) +        cur = lr[i][1] +ans = sum(keep)