#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
constexpr ll INF = 1000000000;
struct com {
  int d;
  int id;
  com(int pd, int pid) : d(pd), id(pid) {}
  int val() const { return d; }
};
bool operator<(com X, com Y) { return X.val() >= Y.val(); }
void solve(istream &cin) {
  ll N, M;
  cin >> N >> M;
  if (!cin) return;
  vector<pair<int, int>> lr;
  priority_queue<com> pq;
  priority_queue<com> zeros;
  list<com> cand;
  for (int i = 0; i < N; ++i) {
    int l, r;
    cin >> l >> r;
    lr.emplace_back(l - 1, r);
    pq.emplace(r - l + 1, i);
  }
  ll can = N;
  cout << can << "\n";
  for (int i = 2; i <= M; ++i) {
    while (!pq.empty() and pq.top().d < i) {
      int pd = pq.top().d;
      int id = pq.top().id;
      pq.pop();
      can--;
      int l, r;
      tie(l, r) = lr[id];
      if (r < i) {
        continue;
      }
      if (pd == i) {
        can++;
      } else {
        zeros.emplace((l + 1) / pd, id);
      }
    }
    while (!zeros.empty() and zeros.top().d <= i) {
      cand.push_back(zeros.top());
      zeros.pop();
    }
    auto it = cand.begin();
    int zer = 0;
    while (it != cand.end()) {
      int id = it->id;
      int l, r;
      tie(l, r) = lr[id];
      if (r < i) {
        auto rmv = it;
        it++;
        cand.erase(rmv);
        continue;
      }
      int d = r / i - l / i;
      if (d > 0) zer++;
      it++;
    }
    cout << can + zer << '\n';
  }
}
int main(int argc, char *argv[]) {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << setprecision(16) << scientific;
  solve(cin);
  return 0;
}
