n,m=map(int, input().split());S=[[]for _ in range(m+1)];exec("l,r=map(int,input().split());S[r-l+1].append((l, r));"*n);B=[0]*(m+2)
def A(i,a):
 while i<=m+1:B[i]+=a;i+=i&(-i)
def C(i):
 r=0
 while i:r+=B[i];i-=i&(-i)
 return r
for i in range(1,m+1):
 for l,r in S[i]:n-=1;A(l,1);A(r+1,-1)
 r=n
 for j in range(0,m+1,i):r+=C(j)
 print(r)