#include <bits/stdc++.h>
int N, M;
std::unordered_multiset<int> NUM[100000 + 111];
std::unordered_multiset<int> NUM_d[100000 + 111];
int main() {
  using std::endl;
  std::cin.sync_with_stdio(false);
  std::cout.sync_with_stdio(false);
  std::cin >> N >> M;
  for (int i = 0; i < N; ++i) {
    int l, r;
    std::cin >> l >> r;
    NUM[l].insert(i);
    NUM_d[r + 1].insert(i);
  }
  for (int i = 1; i < M; ++i) {
    for (auto& v : NUM[i - 1]) {
      NUM[i].insert(v);
    }
    for (auto& v : NUM_d[i]) {
      NUM[i].erase(v);
    }
  }
  for (int i = 1; i <= M; ++i) {
    std::unordered_set<int> count;
    for (int p = i; p <= M; p += i) {
      count.insert(NUM[i].begin(), NUM[i].end());
    }
    std::cout << count.size() << std::endl;
  }
  return 0;
}
