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



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



ans = 0

cur = -10 ** 9

for t, s in A:

    if cur <= s:

        cur = t

        ans += 1



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



A = sorted(((x + l, x - l) for x, l in zip(*[iter(XL)] * 2)), key=lambda x: x[0])



ans = 0

cur = -10 ** 9

for t, s in A:

    if cur <= s:

        cur = t

        ans += 1



print(ans)
N, *XL = list(map(int, open(0).read().split()))
A = sorted((x + l, x - l) for x, l in zip(*[iter(XL)] * 2))
ans = 0
cur = -(10**9)
for t, s in A:
    if cur <= s:
        cur = t
        ans += 1
print(ans)

N, *XL = list(map(int, open(0).read().split()))
A = sorted(((x + l, x - l) for x, l in zip(*[iter(XL)] * 2)), key=lambda x: x[0])
ans = 0
cur = -(10**9)
for t, s in A:
    if cur <= s:
        cur = t
        ans += 1
print(ans)

-A = sorted((x + l, x - l) for x, l in zip(*[iter(XL)] * 2)) +A = sorted(((x + l, x - l) for x, l in zip(*[iter(XL)] * 2)), key=lambda x: x[0])