a=int(eval(input()))

List=[]

for i in range(a):

  p,q=list(map(int,input().split()))

  List.append([p-q,p+q])

List=sorted(List, key=lambda x:x[1])

ans=0

t=-10000000000

for i in range(a):

  if t<=List[i][0]:

    ans+=1

    t=List[i][1]

print(ans)
import math

import sys

from collections import deque

import copy

import itertools

from itertools import permutations

def mi() : return list(map(int,sys.stdin.readline().split()))

def ii() : return int(sys.stdin.readline().rstrip())

def i() : return sys.stdin.readline().rstrip()

a=ii()

List=[]

for i in range(a):

  u,v=mi()

  List.append([u-v,u+v])

List=sorted(List , key=lambda x:x[1])

q=deque([List[0][1]])

ans=1

for i,j in List:

  u=q.pop()

  if u<=i:

    q.append(j)

    ans+=1

  else:

    q.append(u)

print(ans)
a = int(eval(input()))
List = []
for i in range(a):
    p, q = list(map(int, input().split()))
    List.append([p - q, p + q])
List = sorted(List, key=lambda x: x[1])
ans = 0
t = -10000000000
for i in range(a):
    if t <= List[i][0]:
        ans += 1
        t = List[i][1]
print(ans)

import math
import sys
from collections import deque
import copy
import itertools
from itertools import permutations


def mi():
    return list(map(int, sys.stdin.readline().split()))


def ii():
    return int(sys.stdin.readline().rstrip())


def i():
    return sys.stdin.readline().rstrip()


a = ii()
List = []
for i in range(a):
    u, v = mi()
    List.append([u - v, u + v])
List = sorted(List, key=lambda x: x[1])
q = deque([List[0][1]])
ans = 1
for i, j in List:
    u = q.pop()
    if u <= i:
        q.append(j)
        ans += 1
    else:
        q.append(u)
print(ans)

-a = int(eval(input())) +import math +import sys +from collections import deque +import copy +import itertools +from itertools import permutations + + +def mi(): +    return list(map(int, sys.stdin.readline().split())) + + +def ii(): +    return int(sys.stdin.readline().rstrip()) + + +def i(): +    return sys.stdin.readline().rstrip() + + +a = ii() -    p, q = list(map(int, input().split())) -    List.append([p - q, p + q]) +    u, v = mi() +    List.append([u - v, u + v]) -ans = 0 -t = -10000000000 -for i in range(a): -    if t <= List[i][0]: +q = deque([List[0][1]]) +ans = 1 +for i, j in List: +    u = q.pop() +    if u <= i: +        q.append(j) -        t = List[i][1] +    else: +        q.append(u)