n,x=map(int,input().split()) l=[0]*-~x for i in range(n): a,b=map(int,input().split()) l=[max(b-abs(j-a),0,l[j])for j in range(x+1)] print(*l[1:])