N = int(eval(input()))

R = [tuple(map(int, input().split())) for _ in range(N)]

# 左端でソート

R.sort(key=lambda x: x[0]-x[1])

prev_L_arm = R[0][0] - R[0][1]

prev_R_arm = R[0][0] + R[0][1]

ans = N

for i in range(1, N):

    L_arm = R[i][0] - R[i][1]

    R_arm = R[i][0] + R[i][1]

    if L_arm < prev_R_arm:

        prev_R_arm = min(prev_R_arm, R_arm)

        ans -= 1

    else:

        prev_R_arm = R_arm

print(ans)
# 解き直し https://atcoder.jp/contests/keyence2020/tasks/keyence2020_b

N = int(eval(input()))

R = [None] * N

for i in range(N):

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

    R[i] = (X-L, X+L)

# 右端でソート

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

ans = N

max_R = R[0][1]

for i in range(1, N):

    if R[i][0] < max_R:

        ans -= 1

    else:

        max_R = R[i][1]

print(ans)
N = int(eval(input()))
R = [tuple(map(int, input().split())) for _ in range(N)]
# 左端でソート
R.sort(key=lambda x: x[0] - x[1])
prev_L_arm = R[0][0] - R[0][1]
prev_R_arm = R[0][0] + R[0][1]
ans = N
for i in range(1, N):
    L_arm = R[i][0] - R[i][1]
    R_arm = R[i][0] + R[i][1]
    if L_arm < prev_R_arm:
        prev_R_arm = min(prev_R_arm, R_arm)
        ans -= 1
    else:
        prev_R_arm = R_arm
print(ans)

# 解き直し https://atcoder.jp/contests/keyence2020/tasks/keyence2020_b
N = int(eval(input()))
R = [None] * N
for i in range(N):
    X, L = list(map(int, input().split()))
    R[i] = (X - L, X + L)
# 右端でソート
R.sort(key=lambda x: x[1])
ans = N
max_R = R[0][1]
for i in range(1, N):
    if R[i][0] < max_R:
        ans -= 1
    else:
        max_R = R[i][1]
print(ans)

+# 解き直し https://atcoder.jp/contests/keyence2020/tasks/keyence2020_b -R = [tuple(map(int, input().split())) for _ in range(N)] -# 左端でソート -R.sort(key=lambda x: x[0] - x[1]) -prev_L_arm = R[0][0] - R[0][1] -prev_R_arm = R[0][0] + R[0][1] +R = [None] * N +for i in range(N): +    X, L = list(map(int, input().split())) +    R[i] = (X - L, X + L) +# 右端でソート +R.sort(key=lambda x: x[1]) +max_R = R[0][1] -    L_arm = R[i][0] - R[i][1] -    R_arm = R[i][0] + R[i][1] -    if L_arm < prev_R_arm: -        prev_R_arm = min(prev_R_arm, R_arm) +    if R[i][0] < max_R: -        prev_R_arm = R_arm +        max_R = R[i][1]