import bisect

N=int(eval(input()))



rllist=[]

for _ in range(N):

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

  rllist.append((X+L,X-L))

rllist.sort()

#print(rllist)



dp=[0]*N

for i in range(N):

  r,l=rllist[i]

  

  pos=bisect.bisect(rllist,(l,float("inf")))

  #print(i,pos)

  dp[i]=max(dp[i-1],dp[pos-1]+1)

  

#print(dp)

print((dp[-1]))
N=int(eval(input()))



rllist=[]

for _ in range(N):

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

  rllist.append((X+L,X-L))

rllist.sort()

#print(rllist)



answer=0

max_r=-float("inf")

for r,l in rllist:

  #print(max_r,l)

  if max_r<=l:

    answer+=1

    max_r=max(max_r,r)

  

print(answer)
import bisect

N = int(eval(input()))
rllist = []
for _ in range(N):
    X, L = list(map(int, input().split()))
    rllist.append((X + L, X - L))
rllist.sort()
# print(rllist)
dp = [0] * N
for i in range(N):
    r, l = rllist[i]
    pos = bisect.bisect(rllist, (l, float("inf")))
    # print(i,pos)
    dp[i] = max(dp[i - 1], dp[pos - 1] + 1)
# print(dp)
print((dp[-1]))

N = int(eval(input()))
rllist = []
for _ in range(N):
    X, L = list(map(int, input().split()))
    rllist.append((X + L, X - L))
rllist.sort()
# print(rllist)
answer = 0
max_r = -float("inf")
for r, l in rllist:
    # print(max_r,l)
    if max_r <= l:
        answer += 1
        max_r = max(max_r, r)
print(answer)

-import bisect - -dp = [0] * N -for i in range(N): -    r, l = rllist[i] -    pos = bisect.bisect(rllist, (l, float("inf"))) -    # print(i,pos) -    dp[i] = max(dp[i - 1], dp[pos - 1] + 1) -# print(dp) -print((dp[-1])) +answer = 0 +max_r = -float("inf") +for r, l in rllist: +    # print(max_r,l) +    if max_r <= l: +        answer += 1 +        max_r = max(max_r, r) +print(answer)