Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
T=[]
for i in range(N):
    X,L=map(int,list(input().split(" ")))
    T.append([X+L,X-L])
T.sort()
sum=1
def check(T,v,w):
    if T[v][0]<=T[w][1] or T[v][1]>=T[w][0]:
        return True
    else:
        return False

checks=[0]
for i in range(1,N):
    count=0
    for  j in checks:
        if not check(T,i,j):
            break
        count+=1
    if count==len(checks):
        sum+=1
        checks.append(i)
print(sum)

Fixed submission:
N=int(input())
X=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append([a+b,a-b])
X.sort()
D={}
D[0]=1
exe=[0]
for i in range(1,N):
    k=X[i][0]
    if X[i][1]<X[exe[-1]][0]:
        D[i]=D[exe[-1]]
    else:
        D[i]=D[exe[-1]]+1
        exe.append(i)
print(len(exe))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N=int(input())
X=[]
x=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append([a+b,a-b])

def nibun(lis,x):
    i=len(lis)
    if i==1:
        if lis[0]<=x:
            return lis[0]
    elif lis[i//2]==x:
        return x
    else:
        if x<lis[i//2]:
            return nibun(lis[:i//2],x)
        else:
            return nibun(lis[i//2:],x)
X.sort()
a={}
a[X[0][0]]=1
a[-np.inf]=0
T=[]
b={}
for i in range(1,N):
    T.append(X[i-1][0])
    k=nibun(T,X[i][1])
    if k==None:
        b[i]=-np.inf
    else:
        b[i]=k
    a[X[i][0]]=max(a[X[i-1][0]],a[b[i]]+1)
print(a[X[N-1][0]])

Fixed submission:
N=int(input())
X=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append([a+b,a-b])
X.sort()
D={}
D[0]=1
exe=[0]
for i in range(1,N):
    k=X[i][0]
    if X[i][1]<X[exe[-1]][0]:
        D[i]=D[exe[-1]]
    else:
        D[i]=D[exe[-1]]+1
        exe.append(i)
print(len(exe))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
X=[]
x=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append(a+b)
    x.append(a-b)

def nibun(lis,x):
    i=len(lis)
    if i==1:
        if lis[0]<=x:
            return lis[0]
    elif lis[i//2]==x:
        return x
    else:
        if x<lis[i//2]:
            return nibun(lis[:i//2],x)
        else:
            return nibun(lis[i//2:],x)

X.sort()
x.sort()
a={}
a[x[0]]=0
a[X[0]]=1
for i in range(1,N):
    k=nibun(X[:i],x[i])
    if k==None:
        a[x[i]]=0
    else:
        a[x[i]]=a[k]
    a[X[i]]=max(a[X[i-1]],a[x[i]]+1)
print(a[X[N-1]])

Fixed submission:
N=int(input())
X=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append([a+b,a-b])
X.sort()
D={}
D[0]=1
exe=[0]
for i in range(1,N):
    k=X[i][0]
    if X[i][1]<X[exe[-1]][0]:
        D[i]=D[exe[-1]]
    else:
        D[i]=D[exe[-1]]+1
        exe.append(i)
print(len(exe))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
X=[]
x=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append(a+b)
    x.append(a-b)

def nibun(lis,x):
    i=len(lis)
    if i==1:
        if lis[0]<=x:
            return lis[0]
    elif lis[i//2]==x:
        return x
    else:
        if x<lis[i//2]:
            return nibun(lis[:i//2],x)
        else:
            return nibun(lis[i//2:],x)
    
X.sort()
x.sort()
a={}
a[x[0]]=0
a[X[0]]=1
for i in range(1,N):
    if nibun(X,x[i])==None:
        a[x[i]]=0
    else:
        a[x[i]]=a[nibun(X,x[i])]
    a[X[i]]=max(a[X[i-1]],a[x[i]]+1)
print(a[X[N-1]])

Fixed submission:
N=int(input())
X=[]
for i in range(N):
    a,b=map(int,list(input().split(" ")))
    X.append([a+b,a-b])
X.sort()
D={}
D[0]=1
exe=[0]
for i in range(1,N):
    k=X[i][0]
    if X[i][1]<X[exe[-1]][0]:
        D[i]=D[exe[-1]]
    else:
        D[i]=D[exe[-1]]+1
        exe.append(i)
print(len(exe))