class RangeAddTree:
    def __init__(self, n):
        self.n = n
        self.a = [0] * (n + 1)

    def get(self, i):
        result = 0
        x = i
        while x > 0:
            result += self.a[x]
            x -= x & -x
        return result

    def _add(self, i, v):
        x = i
        while x <= self.n:
            self.a[x] += v
            x += x & -x

    def add(self, l, r, v):
        self._add(l, v)
        self._add(r + 1, -v)


n, m = map(int, input().split())

souvenirs = {i: set() for i in range(1, m + 1)}
for l, r in (map(int, input().split()) for _ in range(n)):
    souvenirs[r - l + 1].add((l, r))

inevitable = n
st = RangeAddTree(m)

print(n)
for l, r in souvenirs[1]:
    st.add(l, r, 1)
inevitable -= len(souvenirs[1])

for i in range(2, m + 1):
    result = inevitable
    t = i
    while t <= m:
        result += st.get(t)
        t += i
    print(result)
    for l, r in souvenirs[i]:
        st.add(l, r, 1)
    inevitable -= len(souvenirs[i])
