n, m = map(int, input().split())
lr = []
for i in range(n):
    l, r = map(int, input().split())
    lr.append([l, r])

meisan_kinds = [0 for i in range(m + 1)]
for i in range(n):
    l, r = lr[i]
    j = 1
    while True:
        if j <= r - l + 1:
            meisan_kinds[j] += 1
        elif j < l:
            if l // j != r // j or l % j == 0:
                meisan_kinds[j] += 1
        elif l <= j and j <= r:
            meisan_kinds[j] += 1
        else:
            break
        j += 1

for i in range(1, m + 1):
    print(meisan_kinds[i])
