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