import sys

from bisect import bisect

from operator import itemgetter



n = int(eval(input()))

robots = []

for line in sys.stdin:

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

    l, r = X - L, X + L

    robots.append((l, r))

robots.sort(key=itemgetter(1))



dp = [-(10 ** 18)]

for l, r in robots:

    i = bisect(dp, l)

    if len(dp) == i:

        dp.append(r)

    else:

        dp[i] = min(dp[i], r)

print((len(dp) - 1))

import sys

from operator import itemgetter



n = int(eval(input()))

robots = []

for line in sys.stdin:

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

    l, r = X - L, X + L

    robots.append((l, r))

robots.sort(key=itemgetter(1))



curr = -(10 ** 10)

ans = 0

for l, r in robots:

    if curr > l:

        continue

    ans += 1

    curr = r

print(ans)

import sys
from bisect import bisect
from operator import itemgetter

n = int(eval(input()))
robots = []
for line in sys.stdin:
    X, L = list(map(int, line.split()))
    l, r = X - L, X + L
    robots.append((l, r))
robots.sort(key=itemgetter(1))
dp = [-(10**18)]
for l, r in robots:
    i = bisect(dp, l)
    if len(dp) == i:
        dp.append(r)
    else:
        dp[i] = min(dp[i], r)
print((len(dp) - 1))

import sys
from operator import itemgetter

n = int(eval(input()))
robots = []
for line in sys.stdin:
    X, L = list(map(int, line.split()))
    l, r = X - L, X + L
    robots.append((l, r))
robots.sort(key=itemgetter(1))
curr = -(10**10)
ans = 0
for l, r in robots:
    if curr > l:
        continue
    ans += 1
    curr = r
print(ans)

-from bisect import bisect -dp = [-(10**18)] +curr = -(10**10) +ans = 0 -    i = bisect(dp, l) -    if len(dp) == i: -        dp.append(r) -    else: -        dp[i] = min(dp[i], r) -print((len(dp) - 1)) +    if curr > l: +        continue +    ans += 1 +    curr = r +print(ans)