N = int(input())
P = []
for _ in range(N):
    x, l = list(map(int, input().split()))
    P.append((x + l, x - l))
P.sort()
rw = P[0][0]
ans = 1
for i in range(1, N):
    r, l = P[i]
    if l < rw:
        continue
    else:
        rw = r
        ans += 1
print(ans)

d75295ae2b3c1bbfa0f16da6b1f10b561a627aff
<mask token>

<mask token>
for _ in range(N):
    x, l = list(map(int, input().split()))
    P.append((x + l, x - l))
P.sort()
<mask token>
for i in range(1, N):
    r, l = P[i]
    if l < rw:
        continue
    else:
        rw = r
        ans += 1
print(ans)

N = int(input())
P = []
for _ in range(N):
    x, l = list(map(int, input().split()))
    P.append((x + l, x - l))
P.sort()
rw = P[0][0]
ans = 1
for i in range(1, N):
    r, l = P[i]
    if l < rw:
        continue
    else:
        rw = r
        ans += 1
print(ans)
