mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import sqrt
    input = sys.stdin.readline

    N, M = map(int, input().split())

    m = int(sqrt(M))
    if m*m > M:
        m -= 1

    imos = [0] * (M+2)
    ans = [0] * (M+1)
    for _ in range(N):
        l, r = map(int, input().split())
        for i in range(1, m+1):
            ll = (l-1) // i + 1
            rr = r // i
            if rr >= ll:
                ans[i] += 1
        imos[l] += 1
        imos[r+1] -= 1
        l_prev = l
        for i in range(2, m+1):
            ll = (l - 1) // i + 1
            rr = r // i
            if rr >= ll:
                if rr < l_prev:
                    imos[ll] += 1
                    imos[rr+1] -= 1
                else:
                    imos[l_prev] -= 1
                    imos[ll] += 1
                l_prev = ll
    ans2 = [0] * (M+1)
    for i in range(1, M+1):
        ans2[i] = ans2[i-1] + imos[i]
    for i in range(1, m+1):
        print(ans[i])
    for i in range(m+1, M+1):
        print(ans2[i])


if __name__ == '__main__':
    main()
