from collections import deque



n = int(eval(input()))

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



p = deque()



for i in list:

  p.append([i[0] - i[1],i[0] + i[1]])

  

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



ex = []

ex.append(p.pop(0))









for i in range(len(p)):

  if(ex[-1][1] <= p[0][0]):

    ex.append(p.pop(0))

  else:

    p.pop(0)



print((len(ex)))
from collections import deque



n = int(eval(input()))

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



p = []

for i in list:

  p.append([i[0] - i[1],i[0] + i[1]])

  

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



p = deque(p)

ex = []

ex.append(p.popleft())









for i in range(len(p)):

  if(ex[-1][1] <= p[0][0]):

    ex.append(p.popleft())

  else:

    p.popleft()



print((len(ex)))
from collections import deque

n = int(eval(input()))
list = [list(map(int, input().split())) for i in range(n)]
p = deque()
for i in list:
    p.append([i[0] - i[1], i[0] + i[1]])
p = sorted(p, key=lambda x: x[1])
ex = []
ex.append(p.pop(0))
for i in range(len(p)):
    if ex[-1][1] <= p[0][0]:
        ex.append(p.pop(0))
    else:
        p.pop(0)
print((len(ex)))

from collections import deque

n = int(eval(input()))
list = [list(map(int, input().split())) for i in range(n)]
p = []
for i in list:
    p.append([i[0] - i[1], i[0] + i[1]])
p = sorted(p, key=lambda x: x[1])
p = deque(p)
ex = []
ex.append(p.popleft())
for i in range(len(p)):
    if ex[-1][1] <= p[0][0]:
        ex.append(p.popleft())
    else:
        p.popleft()
print((len(ex)))

-p = deque() +p = [] +p = deque(p) -ex.append(p.pop(0)) +ex.append(p.popleft()) -        ex.append(p.pop(0)) +        ex.append(p.popleft()) -        p.pop(0) +        p.popleft()