#include <bits/stdc++.h>
using namespace std;
struct Range {
  int l, r;
  Range() {}
} R[300001];
bool operator<(const Range &a, const Range &b) {
  if (a.l != b.l) return a.l < b.l;
  return a.r > b.r;
}
int n, m;
int ans[100001];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> R[i].l >> R[i].r;
  sort(R + 1, R + 1 + n);
  for (int i = 1; i <= m; i++) {
    int cur = i;
    int pos = 1;
    while (pos <= n && cur <= m) {
      while (pos <= n && R[pos].l <= cur) {
        if (R[pos].r >= cur) ans[i]++;
        pos++;
      }
      cur += i;
    }
  }
  for (int i = 1; i <= m; i++) cout << ans[i] << '\n';
}
