local mfl = math.floor
local n, m = io.read("*n", "*n")
local imos = {}
for i = 1, m + 1 do
  imos[i] = 0
end
for i_n = 1, n do
  local l, r = io.read("*n", "*n")
  if l == r then
    local lim = math.ceil(math.sqrt(r))
    for i = 1, lim do
      if r % i == 0 then
        local z = mfl(r / i)
        if i <= z then
          imos[i] = imos[i] + 1
          imos[i + 1] = imos[i + 1] - 1
          if i ~= z then
            imos[z] = imos[z] + 1
            imos[z + 1] = imos[z + 1] - 1
          end
        end
      end
    end
  else
    l = l - 1
    imos[1] = imos[1] + 1
    imos[r + 1] = imos[r + 1] - 1
    for i = 1, r do
      local rlim2 = mfl(r / (i + 1))
      local llim = mfl(l / i)
      if rlim2 < llim then
        imos[rlim2 + 1] = imos[rlim2 + 1] - 1
        imos[llim + 1] = imos[llim + 1] + 1
      else
        if llim <=  r - l then
          break
        else
          for j = r - l + 1, llim do
            local ld, rd = mfl(l / j), mfl(r / j)
            if ld == rd then
              imos[j] = imos[j] - 1
              imos[j + 1] = imos[j + 1] + 1
            end
          end
          break
        end
      end
    end
  end
end
for i = 2, m do
  imos[i] = imos[i] + imos[i - 1]
end
imos[m + 1] = nil
print(table.concat(imos, "\n"))
