# coding: utf-8

# Your code here!

import sys

input = sys.stdin.readline #文字列入力のときは注意



class Bit:

    def __init__(self, n):

        self.size = n

        self.tree = [0] * (n + 1)

        self.base = [0]* (n+1)

 

    def sum(self, i):

        s = 0

        while i > 0:

            s += self.tree[i]

            i -= i & -i

        return s



    def add(self, i, x):

        self.base[i] += x

        while i <= self.size:

            self.tree[i] += x

            i += i & -i

            

    def get(self, i):

        return self.base[i]



class RangeUpdate:

    def __init__(self, n):

        self.p = Bit(n + 1)

        self.q = Bit(n + 1)

     

    def add(self, s, t, x):

        t += 1

        self.p.add(s, -x * s)

        self.p.add(t, x * t)

        self.q.add(s, x)

        self.q.add(t, -x)

     

    def sum(self, s, t):

        t += 1

        return self.p.sum(t) + self.q.sum(t) * t - \

               self.p.sum(s) - self.q.sum(s) * s



#    def get(self, s):

#        return self.p.sum(s+1) + self.q.sum(s+1) * (s+1) - \

#               self.p.sum(s) - self.q.sum(s) * s

    def get(self, s):

        return self.p.get(s+1) + self.q.get(s+1) * (s+1) + self.q.sum(s) 







n,m = [int(i) for i in input().split()]

lr = [[int(i) for i in input().split()] for _ in range(n)]



lr.sort(key=lambda x: x[1]-x[0])



#print(lr)



omiyage = RangeUpdate(m+1)

index = 0

for d in range(1,m+1):

    while(index < n and lr[index][1] - lr[index][0] < d):

        omiyage.add(lr[index][0]+1, lr[index][1]+1, 1)

        index+=1

    ans = 0

    pos = 0

    while(pos <= m):

        ans += omiyage.get(pos+1)

        pos += d

    ans += n-index

    print(ans)

    

class BIT: #0-indexed

    def __init__(self, n):

        self.size = n

        self.tree = [0]*(n+1)

        self.depth = n.bit_length()

        self.n0 = 1<<self.depth

#        self.element = [0]*(n+1)

    def get_sum(self, i): #a_0 + ... + a_{i} #閉区間

        s = 0; i += 1

        while i > 0:

            s += self.tree[i]

            i -= i & -i

        return s

    def query(self,l,r): #a_l + ... + a_r 閉区間

        return self.get_sum(r) - self.get_sum(l-1) 

    def add(self, i, x):

        i += 1

        while i <= self.size:

            self.tree[i] += x

            i += i & -i

        # self.element[i] += x

    #def get(self,i): return element[i]        

    def bisect_left(self,w):

        #和が w 以上になる最小の index

        #w が存在しない場合 self.size を返す

        if w <= 0: return 0

        x,k = 0,self.n0

        for _ in range(self.depth):

            k >>= 1

            if x+k <= self.size and self.tree[x+k] < w:

                w -= self.tree[x+k]

                x += k

        return x

    



# coding: utf-8

# Your code here!

import sys

read = sys.stdin.read

readline = sys.stdin.readline



n,m,*lr = map(int,read().split())



mp = iter(lr)

dlr = [(r-l+1,l,r) for l,r in zip(mp,mp)]

dlr.sort(reverse=True)



ans = [0]*(m+1)



b = BIT(m+2)



for i in range(1,m+1):

    while dlr and dlr[-1][0] < i:

        d,l,r = dlr.pop()

        b.add(l,1)

        b.add(r+1,-1)

        #print(i,l,r)

    

    v = 0

    for j in range(i,m+1,i):

        v += b.get_sum(j)

    #print(b.get_sum(1),b.get_sum(2),b.get_sum(3), b.get_sum(4))   

            

    ans[i] = len(dlr) + v



print(*ans[1:],sep="\n")













# coding: utf-8
# Your code here!
import sys

input = sys.stdin.readline  # 文字列入力のときは注意


class Bit:
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.base = [0] * (n + 1)

    def sum(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s

    def add(self, i, x):
        self.base[i] += x
        while i <= self.size:
            self.tree[i] += x
            i += i & -i

    def get(self, i):
        return self.base[i]


class RangeUpdate:
    def __init__(self, n):
        self.p = Bit(n + 1)
        self.q = Bit(n + 1)

    def add(self, s, t, x):
        t += 1
        self.p.add(s, -x * s)
        self.p.add(t, x * t)
        self.q.add(s, x)
        self.q.add(t, -x)

    def sum(self, s, t):
        t += 1
        return self.p.sum(t) + self.q.sum(t) * t - self.p.sum(s) - self.q.sum(s) * s

    #    def get(self, s):
    #        return self.p.sum(s+1) + self.q.sum(s+1) * (s+1) - \
    #               self.p.sum(s) - self.q.sum(s) * s
    def get(self, s):
        return self.p.get(s + 1) + self.q.get(s + 1) * (s + 1) + self.q.sum(s)


n, m = [int(i) for i in input().split()]
lr = [[int(i) for i in input().split()] for _ in range(n)]
lr.sort(key=lambda x: x[1] - x[0])
# print(lr)
omiyage = RangeUpdate(m + 1)
index = 0
for d in range(1, m + 1):
    while index < n and lr[index][1] - lr[index][0] < d:
        omiyage.add(lr[index][0] + 1, lr[index][1] + 1, 1)
        index += 1
    ans = 0
    pos = 0
    while pos <= m:
        ans += omiyage.get(pos + 1)
        pos += d
    ans += n - index
    print(ans)

class BIT:  # 0-indexed
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)
        self.depth = n.bit_length()
        self.n0 = 1 << self.depth

    #        self.element = [0]*(n+1)
    def get_sum(self, i):  # a_0 + ... + a_{i} #閉区間
        s = 0
        i += 1
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s

    def query(self, l, r):  # a_l + ... + a_r 閉区間
        return self.get_sum(r) - self.get_sum(l - 1)

    def add(self, i, x):
        i += 1
        while i <= self.size:
            self.tree[i] += x
            i += i & -i
        # self.element[i] += x

    # def get(self,i): return element[i]
    def bisect_left(self, w):
        # 和が w 以上になる最小の index
        # w が存在しない場合 self.size を返す
        if w <= 0:
            return 0
        x, k = 0, self.n0
        for _ in range(self.depth):
            k >>= 1
            if x + k <= self.size and self.tree[x + k] < w:
                w -= self.tree[x + k]
                x += k
        return x


# coding: utf-8
# Your code here!
import sys

read = sys.stdin.read
readline = sys.stdin.readline
n, m, *lr = map(int, read().split())
mp = iter(lr)
dlr = [(r - l + 1, l, r) for l, r in zip(mp, mp)]
dlr.sort(reverse=True)
ans = [0] * (m + 1)
b = BIT(m + 2)
for i in range(1, m + 1):
    while dlr and dlr[-1][0] < i:
        d, l, r = dlr.pop()
        b.add(l, 1)
        b.add(r + 1, -1)
        # print(i,l,r)
    v = 0
    for j in range(i, m + 1, i):
        v += b.get_sum(j)
    # print(b.get_sum(1),b.get_sum(2),b.get_sum(3), b.get_sum(4))
    ans[i] = len(dlr) + v
print(*ans[1:], sep="\n")

-# coding: utf-8 -# Your code here! -import sys - -input = sys.stdin.readline  # 文字列入力のときは注意 - - -class Bit: +class BIT:  # 0-indexed -        self.base = [0] * (n + 1) +        self.depth = n.bit_length() +        self.n0 = 1 << self.depth -    def sum(self, i): +    #        self.element = [0]*(n+1) +    def get_sum(self, i):  # a_0 + ... + a_{i} #閉区間 +        i += 1 +    def query(self, l, r):  # a_l + ... + a_r 閉区間 +        return self.get_sum(r) - self.get_sum(l - 1) + -        self.base[i] += x +        i += 1 +        # self.element[i] += x -    def get(self, i): -        return self.base[i] +    # def get(self,i): return element[i] +    def bisect_left(self, w): +        # 和が w 以上になる最小の index +        # w が存在しない場合 self.size を返す +        if w <= 0: +            return 0 +        x, k = 0, self.n0 +        for _ in range(self.depth): +            k >>= 1 +            if x + k <= self.size and self.tree[x + k] < w: +                w -= self.tree[x + k] +                x += k +        return x -class RangeUpdate: -    def __init__(self, n): -        self.p = Bit(n + 1) -        self.q = Bit(n + 1) +# coding: utf-8 +# Your code here! +import sys -    def add(self, s, t, x): -        t += 1 -        self.p.add(s, -x * s) -        self.p.add(t, x * t) -        self.q.add(s, x) -        self.q.add(t, -x) - -    def sum(self, s, t): -        t += 1 -        return self.p.sum(t) + self.q.sum(t) * t - self.p.sum(s) - self.q.sum(s) * s - -    #    def get(self, s): -    #        return self.p.sum(s+1) + self.q.sum(s+1) * (s+1) - \ -    #               self.p.sum(s) - self.q.sum(s) * s -    def get(self, s): -        return self.p.get(s + 1) + self.q.get(s + 1) * (s + 1) + self.q.sum(s) - - -n, m = [int(i) for i in input().split()] -lr = [[int(i) for i in input().split()] for _ in range(n)] -lr.sort(key=lambda x: x[1] - x[0]) -# print(lr) -omiyage = RangeUpdate(m + 1) -index = 0 -for d in range(1, m + 1): -    while index < n and lr[index][1] - lr[index][0] < d: -        omiyage.add(lr[index][0] + 1, lr[index][1] + 1, 1) -        index += 1 -    ans = 0 -    pos = 0 -    while pos <= m: -        ans += omiyage.get(pos + 1) -        pos += d -    ans += n - index -    print(ans) +read = sys.stdin.read +readline = sys.stdin.readline +n, m, *lr = map(int, read().split()) +mp = iter(lr) +dlr = [(r - l + 1, l, r) for l, r in zip(mp, mp)] +dlr.sort(reverse=True) +ans = [0] * (m + 1) +b = BIT(m + 2) +for i in range(1, m + 1): +    while dlr and dlr[-1][0] < i: +        d, l, r = dlr.pop() +        b.add(l, 1) +        b.add(r + 1, -1) +        # print(i,l,r) +    v = 0 +    for j in range(i, m + 1, i): +        v += b.get_sum(j) +    # print(b.get_sum(1),b.get_sum(2),b.get_sum(3), b.get_sum(4)) +    ans[i] = len(dlr) + v +print(*ans[1:], sep="\n")