n = int(eval(input()))



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

s.sort()



stop = s[0][0] + s[0][1]

ans = 1

for i in range(1,n):

    num = s[i][0]

    l = s[i][1]

    if num - l >= stop:

        ans += 1

        stop = num + l

    if num + l < stop:

        stop = num + l

    



print(ans)





n = int(eval(input()))

a = []

for i in range(n):

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

    s = x-l

    g = x+l

    a.append((s,g))



a = sorted(a, reverse=False, key=lambda x: x[1]) 

tmp = a[0][1]

ans = 1

for i in range(1,len(a)):

    if tmp <= a[i][0]:

        tmp = a[i][1]

        ans += 1 



print(ans)
n = int(eval(input()))
s = [list(map(int, input().split())) for i in range(n)]
s.sort()
stop = s[0][0] + s[0][1]
ans = 1
for i in range(1, n):
    num = s[i][0]
    l = s[i][1]
    if num - l >= stop:
        ans += 1
        stop = num + l
    if num + l < stop:
        stop = num + l
print(ans)

n = int(eval(input()))
a = []
for i in range(n):
    x, l = list(map(int, input().split()))
    s = x - l
    g = x + l
    a.append((s, g))
a = sorted(a, reverse=False, key=lambda x: x[1])
tmp = a[0][1]
ans = 1
for i in range(1, len(a)):
    if tmp <= a[i][0]:
        tmp = a[i][1]
        ans += 1
print(ans)

-s = [list(map(int, input().split())) for i in range(n)] -s.sort() -stop = s[0][0] + s[0][1] +a = [] +for i in range(n): +    x, l = list(map(int, input().split())) +    s = x - l +    g = x + l +    a.append((s, g)) +a = sorted(a, reverse=False, key=lambda x: x[1]) +tmp = a[0][1] -for i in range(1, n): -    num = s[i][0] -    l = s[i][1] -    if num - l >= stop: +for i in range(1, len(a)): +    if tmp <= a[i][0]: +        tmp = a[i][1] -        stop = num + l -    if num + l < stop: -        stop = num + l