from operator import itemgetter

N = int(eval(input()))

arms = []

finishtime = float('-inf')

for i in range(N):

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

    arms.append((x-l,x+l))

arms.sort(key=itemgetter(1))

cnt=0

for L,R in arms:

    if finishtime<=L:

        cnt+=1

        finishtime = R

print(cnt)
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



from operator import itemgetter



# 区間スケジューリング



N = int(readline())

m = list(map(int,read().split()))

XL = list(zip(m,m))



LR = [(x-l,x+l) for x,l in XL]

LR.sort(key = itemgetter(1))



INF = 10 ** 18

prev_R = -INF

cnt = 0

for L,R in LR:

    if prev_R > L:

        continue

    cnt += 1

    prev_R = R



print(cnt)

from operator import itemgetter

N = int(eval(input()))
arms = []
finishtime = float("-inf")
for i in range(N):
    x, l = list(map(int, input().split()))
    arms.append((x - l, x + l))
arms.sort(key=itemgetter(1))
cnt = 0
for L, R in arms:
    if finishtime <= L:
        cnt += 1
        finishtime = R
print(cnt)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from operator import itemgetter

# 区間スケジューリング
N = int(readline())
m = list(map(int, read().split()))
XL = list(zip(m, m))
LR = [(x - l, x + l) for x, l in XL]
LR.sort(key=itemgetter(1))
INF = 10**18
prev_R = -INF
cnt = 0
for L, R in LR:
    if prev_R > L:
        continue
    cnt += 1
    prev_R = R
print(cnt)

+import sys + +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines -N = int(eval(input())) -arms = [] -finishtime = float("-inf") -for i in range(N): -    x, l = list(map(int, input().split())) -    arms.append((x - l, x + l)) -arms.sort(key=itemgetter(1)) +# 区間スケジューリング +N = int(readline()) +m = list(map(int, read().split())) +XL = list(zip(m, m)) +LR = [(x - l, x + l) for x, l in XL] +LR.sort(key=itemgetter(1)) +INF = 10**18 +prev_R = -INF -for L, R in arms: -    if finishtime <= L: -        cnt += 1 -        finishtime = R +for L, R in LR: +    if prev_R > L: +        continue +    cnt += 1 +    prev_R = R