#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  scanf("%d %d\n", &N, &M);
  vector<int> results_imos(M, 0);
  for (int i = 0; i < N; ++i) {
    int li, ri;
    scanf("%d %d\n", &li, &ri);
    if (ri - li + 1 < li) {
      ++results_imos[0];
      if (ri - li + 1 < M) --results_imos[ri - li + 1];
      ++results_imos[li - 1];
      if (ri < M) --results_imos[ri];
      for (int i = ri - li + 2; i < li; ++i) {
        if ((ri / i) * i >= li) {
          ++results_imos[i - 1];
          if (i < M) --results_imos[i];
        }
      }
    } else {
      ++results_imos[0];
      if (ri < M) --results_imos[ri];
    }
  }
  int sum = 0;
  for (auto& elem : results_imos) {
    sum += elem;
    printf("%d\n", sum);
  }
}
