[n,m]=[int(i) for i in input().split()]
l=[]
r=[]
for i in range(n):
  [a,b]=[int(i) for i in input().split()]
  l.append(a)
  r.append(b)
c=0
for i in range(1,m+1):
  for j in range(n):
    if int(r[j]/i)-int(l[j]/i)>0 or r[j]%i==0 or l[j]%i==0:
        c+=1
  print(c)
  c=0