#include <bits/stdc++.h>
using namespace std;
const int Nmax = 3e5 + 5;
struct line {
  int l, r;
  bool operator<(const line &b) const { return l < b.l; }
};
line a[Nmax];
int ans[Nmax];
int n, m;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].l >> a[i].r;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= m; i++) {
    int j = 1;
    int res = i;
    while (res <= m) {
      while (j <= n && a[j].l <= res) {
        if (res <= a[j].r) ans[i]++;
        j++;
      }
      res += i;
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << "\n";
  }
  return 0;
}
