n = int(eval(input()))

ll = []

for i in range(n):

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

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

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



ans = 0

tmp = -10**9



for l in ll:

  if l[0] >= tmp:

    ans += 1

    tmp = l[1]



print(ans)
import sys

input = sys.stdin.readline



n = int(eval(input()))

ll = []

for i in range(n):

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

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

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



ans = 0

tmp = -10**9



for l in ll:

  if l[0] >= tmp:

    ans += 1

    tmp = l[1]



print(ans)
n = int(eval(input()))
ll = []
for i in range(n):
    x, l = list(map(int, input().split()))
    ll.append([x - l, x + l])
ll.sort(key=lambda x: x[1])
ans = 0
tmp = -(10**9)
for l in ll:
    if l[0] >= tmp:
        ans += 1
        tmp = l[1]
print(ans)

import sys

input = sys.stdin.readline
n = int(eval(input()))
ll = []
for i in range(n):
    x, l = list(map(int, input().split()))
    ll.append([x - l, x + l])
ll.sort(key=lambda x: x[1])
ans = 0
tmp = -(10**9)
for l in ll:
    if l[0] >= tmp:
        ans += 1
        tmp = l[1]
print(ans)

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