#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, int> x[300000];
int bit[300001];
int ans[100001];
int sum(int i) {
  int s = 0;
  while (i <= m) {
    s += bit[i];
    i += i & -i;
  }
  return s;
}
void add(int i, int y) {
  if (i == 0) return;
  while (i > 0) {
    bit[i] += y;
    i -= i & -i;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    x[i] = pair<int, int>(r - l + 1, r);
  }
  sort(x, x + n);
  int it = 0;
  for (int i = 1; i <= m; i++) {
    while (it < n && x[it].first < i) {
      add(x[it].second, 1);
      add(x[it].second - x[it].first, -1);
      it++;
    }
    ans[i] += n - it;
    for (int j = i; j <= m; j += i) {
      ans[i] += sum(j);
    }
  }
  for (int i = 1; i <= m; i++) cout << ans[i] << endl;
}
