#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int main() {
  int N, M;
  cin >> N >> M;
  int l, r;
  vector<pair<int, int> > vp;
  for (int i = 0; i < N; i++) {
    cin >> l >> r;
    vp.push_back(pair<int, int>(l, r));
  }
  int count;
  for (int m = 0; m < M; m++) {
    count = 0;
    for (int i = 0; i < N; i++) {
      int ln = vp[i].first;
      int rn = vp[i].second;
      if (ln % (m + 1) == 0 || rn % (m + 1) == 0 ||
          (rn / (m + 1)) - (ln / (m + 1)) >= 1) {
        count++;
      }
    }
    cout << count << endl;
  }
  return 0;
}
