#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007ll;
const double EPS = 1e-11;
int n, m;
pair<int, int> ranges[353531];
int ans[125252];
const int B = 300;
const int C = 400;
struct data {
  int id, pos, in;
  priority_queue<pair<int, int> > Q;
};
data pts[C];
int M[125252];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (int)(n); ++i) {
    int l, r;
    scanf("%d%d", &l, &r);
    ranges[i] = pair<int, int>(l, r);
  }
  for (int d = (int)(1); d < (int)(min(B, m + 1)); ++d) {
    for (int i = 0; i < (int)(n); ++i) {
      int left = (ranges[i].first + d - 1) / d;
      if (left * d <= ranges[i].second) ans[d]++;
    }
  }
  sort(ranges, ranges + n);
  data yo;
  yo.id = 0;
  yo.pos = 0;
  yo.in = 0;
  set<int> S;
  int tmp = 0;
  for (int i = (int)(1); i < (int)(m + 1); ++i) {
    yo.pos++;
    while (yo.in < n && ranges[yo.in].first == yo.pos) {
      S.insert(yo.in);
      yo.Q.push(pair<int, int>(-ranges[yo.in].second, yo.in));
      yo.in++;
    }
    while (yo.Q.size() && -yo.Q.top().first < yo.pos) {
      int id = yo.Q.top().second;
      yo.Q.pop();
      S.erase(S.find(id));
    }
    if (i % B == 0) {
      pts[yo.id] = yo;
      pts[yo.id].Q = yo.Q;
      yo.id++;
      for (int x : S) {
        if (M[x] == 0) tmp++;
        M[x]++;
      }
    }
  }
  for (int d = (int)(min(B, m + 1)); d < (int)(m + 1); ++d) {
    ans[d] = tmp;
    if (d == m) break;
    for (int i = 0; i < (int)(yo.id); ++i) {
      if (pts[i].pos > m) break;
      for (int j = 0; j < (int)(i + 1); ++j) {
        pts[i].pos++;
        while (pts[i].in < n && ranges[pts[i].in].first == pts[i].pos) {
          pts[i].Q.push(pair<int, int>(-ranges[pts[i].in].second, pts[i].in));
          if (M[pts[i].in] == 0) tmp++;
          M[pts[i].in]++;
          pts[i].in++;
        }
        while (pts[i].Q.size() && -pts[i].Q.top().first < pts[i].pos) {
          int id = pts[i].Q.top().second;
          pts[i].Q.pop();
          M[id]--;
          if (M[id] == 0) tmp--;
        }
      }
    }
  }
  for (int d = (int)(1); d < (int)(m + 1); ++d) printf("%d\n", ans[d]);
  return 0;
}
