n = int(eval(input()))

robot = []

for _ in range(n):

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

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



# startが被らないendが小さいもの



ans = 0

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

last = - float('inf')

for start, end in robot:

    if start >= last:

        ans += 1

        last = end



print(ans)

import sys

input = sys.stdin.readline



n = int(eval(input()))

robot = []

for _ in range(n):

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

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



# startが被らないendが小さいもの



ans = 0

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

last = - float('inf')

for start, end in robot:

    if start >= last:

        ans += 1

        last = end



print(ans)

n = int(eval(input()))
robot = []
for _ in range(n):
    x, l = list(map(int, input().split()))
    robot.append([x - l, x + l])
# startが被らないendが小さいもの
ans = 0
robot.sort(key=lambda x: x[1])
last = -float("inf")
for start, end in robot:
    if start >= last:
        ans += 1
        last = end
print(ans)

import sys

input = sys.stdin.readline
n = int(eval(input()))
robot = []
for _ in range(n):
    x, l = list(map(int, input().split()))
    robot.append([x - l, x + l])
# startが被らないendが小さいもの
ans = 0
robot.sort(key=lambda x: x[1])
last = -float("inf")
for start, end in robot:
    if start >= last:
        ans += 1
        last = end
print(ans)

+import sys + +input = sys.stdin.readline