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