N = int(eval(input()))

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

B = sorted([[A[i][0]-A[i][1],A[i][0]+A[i][1]] for i in range(N)],key=lambda x:x[1])

cur = 1

C = [B[0]]

while cur<N:

    if B[cur][0]>=C[-1][1]:

        C.append(B[cur])

    cur += 1

print((len(C)))
N = int(eval(input()))

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

B = sorted([(A[i][0]-A[i][1],A[i][0]+A[i][1]) for i in range(N)],key=lambda x:x[0],reverse=True)

B = sorted(B,key=lambda x:x[1])

cnt = 1

cur = B[0][1]

for i in range(1,N):

    if B[i][0]>=cur:

        cnt += 1

        cur = B[i][1]

print(cnt)
N = int(eval(input()))
A = [list(map(int, input().split())) for _ in range(N)]
B = sorted(
    [[A[i][0] - A[i][1], A[i][0] + A[i][1]] for i in range(N)], key=lambda x: x[1]
)
cur = 1
C = [B[0]]
while cur < N:
    if B[cur][0] >= C[-1][1]:
        C.append(B[cur])
    cur += 1
print((len(C)))

N = int(eval(input()))
A = [list(map(int, input().split())) for _ in range(N)]
B = sorted(
    [(A[i][0] - A[i][1], A[i][0] + A[i][1]) for i in range(N)],
    key=lambda x: x[0],
    reverse=True,
)
B = sorted(B, key=lambda x: x[1])
cnt = 1
cur = B[0][1]
for i in range(1, N):
    if B[i][0] >= cur:
        cnt += 1
        cur = B[i][1]
print(cnt)

-    [[A[i][0] - A[i][1], A[i][0] + A[i][1]] for i in range(N)], key=lambda x: x[1] +    [(A[i][0] - A[i][1], A[i][0] + A[i][1]) for i in range(N)], +    key=lambda x: x[0], +    reverse=True, -cur = 1 -C = [B[0]] -while cur < N: -    if B[cur][0] >= C[-1][1]: -        C.append(B[cur]) -    cur += 1 -print((len(C))) +B = sorted(B, key=lambda x: x[1]) +cnt = 1 +cur = B[0][1] +for i in range(1, N): +    if B[i][0] >= cur: +        cnt += 1 +        cur = B[i][1] +print(cnt)