N,X=map(int,input().split()) result=[0]*(X+1) for i in range(N): a,b=map(int,input().split()) for j in range(a-b,a+b+1): if j<0 or j>X: continue result[j]=max(result[j],b-abs(a-j)) result=result[1:] print(*result)