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

meisan_kinds = []
for i in range(1, m + 1):
    c = 0
    for j in range(n):
        l, r = lr[j]
        if l // i != r // i or l % i == 0:
            c += 1
    meisan_kinds.append(c)

for i in range(len(meisan_kinds)):
    print(meisan_kinds[i])
