(N,), *XL = [list(map(int, s.split())) for s in open(0)]

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

curr = -float("inf")

ans = 0

for x, l in XL:

    if x - l >= curr:

        curr = x + l

        ans += 1

print(ans)

N, *XL = list(map(int, open(0).read().split()))

XL = sorted((x + l, x - l) for x, l in zip(*[iter(XL)] * 2))

curr = -float("inf")

ans = 0

for right, left in XL:

    if left >= curr:

        curr = right

        ans += 1

print(ans)



(N,), *XL = [list(map(int, s.split())) for s in open(0)]
XL.sort(key=lambda x: x[0] + x[1])
curr = -float("inf")
ans = 0
for x, l in XL:
    if x - l >= curr:
        curr = x + l
        ans += 1
print(ans)

N, *XL = list(map(int, open(0).read().split()))
XL = sorted((x + l, x - l) for x, l in zip(*[iter(XL)] * 2))
curr = -float("inf")
ans = 0
for right, left in XL:
    if left >= curr:
        curr = right
        ans += 1
print(ans)

-(N,), *XL = [list(map(int, s.split())) for s in open(0)] -XL.sort(key=lambda x: x[0] + x[1]) +N, *XL = list(map(int, open(0).read().split())) +XL = sorted((x + l, x - l) for x, l in zip(*[iter(XL)] * 2)) -for x, l in XL: -    if x - l >= curr: -        curr = x + l +for right, left in XL: +    if left >= curr: +        curr = right