from math import ceil, log2


class SegmentTree:
    def __init__(self, n):
        tn = 2 ** ceil(log2(n))
        self.a = [0] * (tn * 2)

    def find(self, c, l, r, i):
        if l == r:
            return self.a[c]
        mid = (l + r) // 2
        if i <= mid:
            return self.a[c] + self.find(c * 2, l, mid, i)
        else:
            return self.a[c] + self.find(c * 2 + 1, mid + 1, r, i)

    def add(self, c, l, r, s, t, x):
        if l == r or l == s and r == t:
            self.a[c] += x
            return
        mid = (l + r) // 2
        if t <= mid:
            self.add(c * 2, l, mid, s, t, x)
        elif s > mid:
            self.add(c * 2 + 1, mid + 1, r, s, t, x)
        else:
            self.add(c * 2, l, mid, s, mid, x)
            self.add(c * 2 + 1, mid + 1, r, mid + 1, t, x)


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 = SegmentTree(m)

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

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