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