N = int(eval(input()))

robots, count = [], 0

for x in range(N):

    X, L = list(map(int, input().split()))

    robots.append((X+L, X-L))

robots.sort()

node = -10**12

for end, start in robots:

    if start >= node:

        node = end

        count += 1

print(count)
import sys

input = sys.stdin.readline

 

n = int(eval(input()))

robots = []

for i in range(n):

    x, l = [int(item) for item in input().split()]

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

 

robots.sort()

 

cnt = 0

node = -10**12

for end, start in robots:

    if start >= node:

        node = end

        cnt += 1

print(cnt)
N = int(eval(input()))
robots, count = [], 0
for x in range(N):
    X, L = list(map(int, input().split()))
    robots.append((X + L, X - L))
robots.sort()
node = -(10**12)
for end, start in robots:
    if start >= node:
        node = end
        count += 1
print(count)

import sys

input = sys.stdin.readline
n = int(eval(input()))
robots = []
for i in range(n):
    x, l = [int(item) for item in input().split()]
    robots.append((x + l, x - l))
robots.sort()
cnt = 0
node = -(10**12)
for end, start in robots:
    if start >= node:
        node = end
        cnt += 1
print(cnt)

-N = int(eval(input())) -robots, count = [], 0 -for x in range(N): -    X, L = list(map(int, input().split())) -    robots.append((X + L, X - L)) +import sys + +input = sys.stdin.readline +n = int(eval(input())) +robots = [] +for i in range(n): +    x, l = [int(item) for item in input().split()] +    robots.append((x + l, x - l)) +cnt = 0 -        count += 1 -print(count) +        cnt += 1 +print(cnt)