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