#include <bits/stdc++.h>
int main() {
  std::map<int, std::map<int, int>> data;
  int N, M;
  std::cin >> N >> M;
  for (int i{}; i < N; ++i) {
    int l, r;
    std::cin >> l >> r;
    ++data[r - l][l];
  }
  for (int i = 1; i <= M; ++i) {
    int result{};
    int sum{};
    for (auto ite = data.begin(); ite != data.end(); ++ite) {
      if (ite->first + 1 >= i) {
        std::cout << result + N - sum << std::endl;
        goto next;
      }
      for (auto p : ite->second) {
        auto u = p.first % i;
        if (u == 0 || u + ite->first >= i) {
          result += p.second;
        }
        sum += p.second;
      }
    }
    std::cout << result << std::endl;
  next:;
  }
}
