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