#include <bits/stdc++.h>
using namespace std;
struct BinaryIndexedTree {
  vector<int> data;
  BinaryIndexedTree(int sz) { data.assign(++sz, 0); }
  int sum(int k) {
    int ret = 0;
    for (++k; k > 0; k -= k & -k) ret += data[k];
    return (ret);
  }
  void add(int k, int x) {
    for (++k; k < data.size(); k += k & -k) data[k] += x;
  }
};
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> in[100002], out[100002];
  for (int i = 0; i < N; i++) {
    int L, R;
    cin >> L >> R;
    in[L].push_back(L);
    out[R].push_back(L);
  }
  queue<tuple<int, int> > nxt[100002];
  for (int i = 1; i <= M; i++) nxt[i].emplace(0, i);
  int sum[100002] = {};
  BinaryIndexedTree bit(M + 5);
  for (int i = 1; i <= M; i++) {
    for (auto &pp : in[i]) bit.add(pp, +1);
    auto &q = nxt[i];
    while (!q.empty()) {
      int lastupdate, idx;
      tie(lastupdate, idx) = q.front();
      q.pop();
      sum[idx] += bit.sum(i) - bit.sum(lastupdate);
      nxt[idx + i].emplace(i, idx);
    }
    for (auto &pp : out[i]) bit.add(pp, -1);
  }
  for (int i = 1; i <= M; i++) {
    cout << sum[i] << endl;
  }
}
