import sys
input = sys.stdin.readline

def solve():
    def makeBIT(numEle):
        numPow2 = 2 ** (numEle-1).bit_length()
        data = [0] * (numPow2+1)
        return data, numPow2
    def addValue(iA, A):
        iB = iA + 1
        while iB <= numPow2:
            data[iB] += A
            iB += iB & -iB
    def getSum(iA):
        iB = iA + 1
        ans = 0
        while iB > 0:
            ans += data[iB]
            iB -= iB & -iB
        return ans

    N, M = map(int, input().split())
    querys = []
    for _ in range(N):
        L, R = map(int, input().split())
        querys.append((L, R, 0))
    for d in range(1, M+1):
        for k in range(1, M//d+1):
            querys.append((k*d, M, d, +1))
            querys.append((k*d, k*d-1, d, -1))
            querys.append(((k-1)*d, M, d, -1))
            querys.append(((k-1)*d, k*d-1, d, +1))

    querys.sort()

    data, numPow2 = makeBIT(M+1)

    anss = [0] * (M+1)
    for query in querys:
        _, y, *vs = query
        if vs[0] == 0:
            addValue(y, 1)
        else:
            d, s = vs
            v = getSum(y)
            anss[d] += s*v

    print('\n'.join(map(str, anss[1:])))


solve()
