#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
const int _ML = 200;
const char _inpf[] = "";
const char _outf[] = "";
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const pair<T, U> &_p) {
  _out << _p.x << ' ' << _p.y;
  return _out;
}
template <typename T, typename U>
inline istream &operator>>(istream &_in, pair<T, U> &_p) {
  _in >> _p.x >> _p.y;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const vector<T> &_v) {
  if (_v.empty()) return _out;
  _out << _v.front();
  for (auto _it = ++_v.begin(); _it != _v.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T>
inline istream &operator>>(istream &_in, vector<T> &_v) {
  for (auto &_i : _v) _in >> _i;
  return _in;
}
template <typename T>
inline ostream &operator<<(ostream &_out, const set<T> &_s) {
  if (_s.empty()) return _out;
  _out << *_s.begin();
  for (auto _it = ++_s.begin(); _it != _s.end(); ++_it) _out << ' ' << *_it;
  return _out;
}
template <typename T, typename U>
inline ostream &operator<<(ostream &_out, const map<T, U> &_m) {
  if (_m.empty()) return _out;
  _out << _m.begin()->x << ": " << _m.begin()->y;
  for (auto _it = ++_m.begin(); _it != _m.end(); ++_it)
    _out << ", " << _it->x << ": " << _it->y;
  return _out;
}
const int N = 100 * 1000 + 228;
int t[N];
void upd_t(int x, int y) {
  for (; x < N; x |= (x + 1)) {
    t[x] += y;
  }
}
int get_t(int x) {
  int ans = 0;
  for (; x >= 0; x = (x & (x + 1)) - 1) {
    ans += t[x];
  }
  return ans;
}
inline void mainFunction(void) {
  int n, m;
  cin >> n >> m;
  map<int, vector<int>> s;
  for (int i = 0; i < n; ++i) {
    int l, r;
    cin >> l >> r;
    s[r - l].push_back(l);
  }
  int cnt = n;
  for (int i = 1; i <= n; ++i) {
    for (auto j : s[i - 2]) {
      upd_t(j + (i - 2) + 1, -1);
      upd_t(j, 1);
      --cnt;
    }
    int ans = cnt;
    for (int j = 0; j <= m; j += i) {
      ans += get_t(j);
    }
    cout << ans << "\n";
  }
}
int main() {
#pragma warning(push)
#pragma warning(disable : 4127)
  if (sizeof(_inpf) > 1) freopen(_inpf, "r", stdin);
  if (sizeof(_outf) > 1) freopen(_outf, "w", stdout);
#pragma warning(pop)
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  mainFunction();
}
