N = int(eval(input()))



X = []

L = []

Y = []

for i in range(N):

  tx,tL = list(map(int,input().split()))

  X.append(tx)

  L.append(tL)

  Y.append((tx-tL,tx+tL))



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



select = 0

for i in range(N):

  if i == 0:

    temp = Y[i][1] #今の終わり

    select += 1

  else:

    if Y[i][0] >= temp: #今の終わりより次の始まりの方が後ならおｋ

      temp = Y[i][1]

      select += 1

print(select)



N = int(eval(input()))

X = [];L =[]

for i in range(N):

  x,l = list(map(int,input().split()))

  X.append(x);L.append(l)

#print(X,L)

Y = []

for i in range(N):

  a = X[i]-L[i];b=X[i]+L[i]

  Y.append([a,b])

#print(Y)

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

ans = 0

end = - float("inf")

for i in range(N):

  if end > Y[i][0]:

    continue

  ans += 1

  end = Y[i][1]

print(ans)

N = int(eval(input()))
X = []
L = []
Y = []
for i in range(N):
    tx, tL = list(map(int, input().split()))
    X.append(tx)
    L.append(tL)
    Y.append((tx - tL, tx + tL))
Y.sort(key=lambda x: x[1])
select = 0
for i in range(N):
    if i == 0:
        temp = Y[i][1]  # 今の終わり
        select += 1
    else:
        if Y[i][0] >= temp:  # 今の終わりより次の始まりの方が後ならおｋ
            temp = Y[i][1]
            select += 1
print(select)

N = int(eval(input()))
X = []
L = []
for i in range(N):
    x, l = list(map(int, input().split()))
    X.append(x)
    L.append(l)
# print(X,L)
Y = []
for i in range(N):
    a = X[i] - L[i]
    b = X[i] + L[i]
    Y.append([a, b])
# print(Y)
Y.sort(key=lambda x: x[1])
ans = 0
end = -float("inf")
for i in range(N):
    if end > Y[i][0]:
        continue
    ans += 1
    end = Y[i][1]
print(ans)

+for i in range(N): +    x, l = list(map(int, input().split())) +    X.append(x) +    L.append(l) +# print(X,L) -    tx, tL = list(map(int, input().split())) -    X.append(tx) -    L.append(tL) -    Y.append((tx - tL, tx + tL)) +    a = X[i] - L[i] +    b = X[i] + L[i] +    Y.append([a, b]) +# print(Y) -select = 0 +ans = 0 +end = -float("inf") -    if i == 0: -        temp = Y[i][1]  # 今の終わり -        select += 1 -    else: -        if Y[i][0] >= temp:  # 今の終わりより次の始まりの方が後ならおｋ -            temp = Y[i][1] -            select += 1 -print(select) +    if end > Y[i][0]: +        continue +    ans += 1 +    end = Y[i][1] +print(ans)