#include <bits/stdc++.h>
int main(void) {
  int n, m;
  std::vector<int> l;
  std::vector<int> r;
  std::cin >> n;
  std::cin >> m;
  l.resize(n);
  r.resize(n);
  for (int i = 0; i < n; i++) {
    std::cin >> l[i];
    std::cin >> r[i];
  }
  for (int i = 1; i <= m; i++) {
    int val = 0;
    for (int j = 0; j < n; j++) {
      int divr = r[j] / i;
      int divl = (l[j] - 1) / i;
      if (l[j] != r[j]) {
        val++;
      }
    }
    std::cout << val << std::endl;
    ;
  }
}
