class Segtree:
    def __init__(self, original, func, element):
        self.n = len(original)
        self.element = element
        self.func = func
        self.N0 = 1 << (self.n-1).bit_length()
        self.seg = [element]*(self.N0 << 1)
        for i, j in enumerate(original, self.N0):
            self.seg[i] = j
        for i in range(self.N0-1, 0, -1):
            self.seg[i] = func(self.seg[2*i], self.seg[2*i+1])

    def get(self, i):
        return self.seg[i+self.N0]
        
    def update(self, i, x):
        i += self.N0
        self.seg[i] = x
        while i > 1:
            y = self.seg[i ^ 1]
            i >>= 1
            x = self.func(x, y)
            self.seg[i] = x
                
    def add(self, i, d):
        self.update(i, self.get(i)+d)
        
    def query(self, l, r):
        l += self.N0
        r += self.N0
        nl = self.element
        nr = self.element
        while l < r:
            if l & 1:
                nl = self.func(nl, self.seg[l])
                l += 1
            if r & 1:
                nr = self.func(nr, self.seg[r-1])
            l >>= 1
            r >>= 1
     
        return self.func(nl, nr)

n, m = map(int, input().split())
L = Segtree([0]*(m+2), lambda x, y:x+y, 0)
LR = [list(map(int, input().split())) for _ in range(n)]
for l, r in LR:
  L.add(l, 1)
  L.add(r+1, -1)
S = sorted([(r-l+1, l, r) for l, r in LR])
cnt = 0
A = []
for i in range(m, 0, -1):
  while S and S[-1][0] == i:
    c, l, r = S.pop()
    cnt += 1
    L.add(l, -1)
    L.add(r+1, 1)
  res = cnt
  for j in range(0, m+1, i):
    res += L.query(0, j+1)
  A.append(res)
print(*A[::-1], sep="\n")