N,X = map(int,input().split()) L = [0]*X for _ in range(N): a,b = map(int,input().split()) for j in range(X): l = max(b - abs(a-1 - j), 0) L[j] = max(L[j], l) print(*L)