N, X = map(int, input().split(' ')) A = [0] * N B = [0] * N for i in range(N): A[i],B[i] = map(int, input().split(' ')) ans = [] for i in range(X): ans.append(max([max(y - abs((x-1)-i),0) for x, y in zip(A,B)])) print(' '.join([str(i) for i in ans]))