import sys
from collections import Counter

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG: {} -> {}'.format(name, val), file=sys.stderr)
            return None

N, M = map(int, input().split())
L = {}
R = {}

for i in range(N):
    left, right = map(int, input().split())
    if left in L:
        L[left].add(i)
    else:
        L[left] = {i}

    if (right + 1) in R:
        R[right + 1].add(i)
    else:
        R[right + 1] = {i}

# debug(L, locals())
# debug(R, locals())

eki_kaeru = [set()] * (M + 1)
tmp = set()

for eki in range(M + 1):
    if eki in L:
        eki_kaeru[eki] = tmp.union(L[eki])
    else:
        eki_kaeru[eki] = tmp.copy()
    if eki in R:
        eki_kaeru[eki] -= R[eki]

    tmp = eki_kaeru[eki]
    # debug(tmp, locals())

# debug(eki_kaeru, locals())

ans = []

for d in range(1, M + 1):
    buy = set()

    for i in range(0, M + 1, d):
        buy = buy.union(eki_kaeru[i])

    ans.append(len(buy))

print(*ans, sep='\n')
