#coding: UTF-8
N,M=map(int,input().split())
d_list=[[0]]*M
sd_list=[0]*M
for i in range(0,N):
    l,r=map(int,input().split())
    d=r-l
    if d_list[d]==[0]:
        d_list[d]=[[l,r]]
    else:
        d_list[d].append([l,r])

for i in range(0,M):
    if d_list[i]!=[0]:
        sd_list[i]=len(d_list[i])
plist=[[0 for i in range(0,M)] for i in range(0,M)]
for i in range(0,M):
    if 0 not in d_list[i]:
        for L in d_list[i]:
            for j in range(L[0],L[1]+1):
                plist[i][j-1]+=1
out=[0]*M
out[0]=sd_list[0]
for i in range(1,M):
    out[i]=sd_list[i]
    for k in range(0,i):
        for j in range(i,M,i+1):
            out[i]+=plist[k][j]

for i in range(0,M):
    print(out[i])