from collections import * from itertools import * from functools import * from heapq import * import sys, math input = sys.stdin.readline N, X = map(int, input().split()) AB = [tuple(map(int, input().split())) for _ in range(N)] ans = [0] * (X + 1) for x in range(1, X + 1): for a, b in AB: ans[x] = max(ans[x], b - abs(x - a)) print(*ans[1:])