import sys
input = sys.stdin.readline
from collections import defaultdict

N,M = map(int,input().split())
d_to_L = [[] for _ in range(M+1)]
for _ in range(N):
    L,R = map(int,input().split())
    d_to_L[R-L+1].append(L)

tree = [0] * (M+1) # BIT で管理。左にあるLの個数 - (R+1)の個数 → いくつの[L,R]に入っているか
long = N # 長すぎて自動回収できる
answer = [0] * (M+1)

for m in range(1,M+1):
    for L in d_to_L[m]:
        x = L
        while x <= M:
            tree[x] += 1
            x += x & (-x)
        x = L+m
        while x <= M:
            tree[x] -= 1
            x += x & (-x)
        long -= 1
    s = long
    for x in range(m,M+1,m):
        while x:
            s += tree[x]
            x -= x & (-x)
    answer[m] = s

print('\n'.join(map(str, answer[1:])))
