In a factory, there are N robots placed on a number line. Robot i is placed at coordinate X_i and can extend its arms of length L_i in both directions, positive and negative.  We want to remove zero or more robots so that the movable ranges of arms of no two remaining robots intersect. Here, for each i (1 \leq i \leq N), the movable range of arms of Robot i is the part of the number line between the coordinates X_i - L_i and X_i + L_i, excluding the endpoints.  Find the maximum number of robots that we can keep.
n = int(input())
xl = [list(map(int, input().split())) for _ in range(n)]

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

cnt = [0 for _ in range(10**8)]
ans = [0 for _ in range(n)]

for i in range(n):
    for j in range(xl[i][0] - xl[i][1] + 1, xl[i][0] + xl[i][1]):
        if cnt[j] == 0:
            cnt[j] = 1
        else:
            break
        if j == xl[i][0] + xl[i][1]-1:
            ans[i] = 1

print(sum(ans))

import sys
input = sys.stdin.readline

n = int(input())
xl = [list(map(int, input().split())) for _ in range(n)]
xl2 = sorted([[x + l, x - l] for x, l in xl])

ans = 0
mr = xl2[0][1]
for r, l in xl2:
    if l >= mr:
        ans += 1
        mr = r
print(ans)
