#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e6 + 8;
const long long sz = 1e5 + 5;
void f_io() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
}
std::vector<pair<long long, pair<long long, long long>>> seg;
vector<long long> BIT;
void update(long long at, long long by) {
  while (at < BIT.size()) {
    BIT[at] += by;
    at += (at & (-at));
  }
}
void updateR(long long l, long long r, long long val) {
  update(l, val);
  update(r + 1, -val);
}
long long query(long long at) {
  long long ret = 0;
  while (at > 0) {
    ret += BIT[at];
    at -= (at & (-at));
  }
  return ret;
}
long long n, m;
int32_t main() {
  f_io();
  long long t = 1;
  while (t--) {
    cin >> n >> m;
    BIT.resize(m + 1);
    for (long long i = 0; i < n; i++) {
      long long a, b;
      cin >> a >> b;
      seg.push_back({b - a + 1, {a, b}});
    }
    sort(seg.begin(), seg.end());
    for (long long d = 1; d < m + 1; d++) {
      while (seg.size() && seg[0].first < d) {
        auto s = seg[0];
        seg.erase(seg.begin());
        updateR(s.second.first, s.second.second, 1);
      }
      long long fans = seg.size();
      for (long long k = d; k < m + 1; k += d) {
        fans += query(d);
      }
      cout << fans << "\n";
    }
  }
}
