N, X = map(int, input().split()) C = [0] * (X + 1) S = [list(map(int, input().split())) for _ in range(N)] for a, b in S: for x in range(1, X + 1): cand = max(b - abs(x - a), 0) C[x] = max(C[x], cand) print(*C[1:])