from heapq import heappop, heappush



n = int(eval(input()))

robots = []

for _ in range(n):

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

  heappush(robots, (x+l, x-l))



robot = heappop(robots)

hand = robot[0]

count = 1

while robots:

  robot = heappop(robots)

  if hand <= robot[1]:

    hand = robot[0]

    count += 1

print(count)
n = int(eval(input()))

robots = []

for _ in range(n):

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

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

robots.sort()



hand = robots[0][0]

count = 1

for robot in robots[1:]:

  if hand <= robot[1]:

    hand = robot[0]

    count += 1

print(count)
from heapq import heappop, heappush

n = int(eval(input()))
robots = []
for _ in range(n):
    x, l = list(map(int, input().split()))
    heappush(robots, (x + l, x - l))
robot = heappop(robots)
hand = robot[0]
count = 1
while robots:
    robot = heappop(robots)
    if hand <= robot[1]:
        hand = robot[0]
        count += 1
print(count)

n = int(eval(input()))
robots = []
for _ in range(n):
    x, l = list(map(int, input().split()))
    robots.append((x + l, x - l))
robots.sort()
hand = robots[0][0]
count = 1
for robot in robots[1:]:
    if hand <= robot[1]:
        hand = robot[0]
        count += 1
print(count)

-from heapq import heappop, heappush - -    heappush(robots, (x + l, x - l)) -robot = heappop(robots) -hand = robot[0] +    robots.append((x + l, x - l)) +robots.sort() +hand = robots[0][0] -while robots: -    robot = heappop(robots) +for robot in robots[1:]: