#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 87;
map<int, int> fen[N];
vector<pair<int, int> > a[N];
int po[N];
int qry(int x, int y) {
  y = N - y;
  int ret = 0;
  for (int r = x; r; r ^= r & -r)
    for (int c = y; c; c ^= c & -c) ret += fen[r][c];
  return ret;
}
void upd(int x, int y) {
  y = N - y;
  for (int r = x; r < N; r += r & -r)
    for (int c = y; c < N; c += c & -c) ++fen[r][c];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    int l, r;
    cin >> l >> r;
    a[r - l + 1].emplace_back(l, r);
  }
  for (int i = m; i >= 1; --i) po[i] = a[i].size() + po[i + 1];
  for (int i = 1; i <= m; ++i) {
    int ans = po[i];
    for (int j = i; j <= m; j += i) ans += qry(j, j);
    cout << ans << '\n';
    for (const pair<int, int>& p : a[i]) upd(p.first, p.second);
  }
}
