from itertools import accumulate

n, m = map(int, input().split())
L = [0]*(m+2)
for i in range(n):
  l, r = map(int, input().split())
  L[l] += 1<<i
  L[r+1] -= 1<<i
A = list(accumulate(L))
for i in range(1, m+1):
  cnt = 0
  for j in range(0, m+1, i):
    cnt |= A[j]
  print(bin(cnt).count("1"))