#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
vector<int> fenwick[maxn];
int get(int pref, int l, int r) {
  int ans = 0;
  for (; pref > 0; pref -= (pref & -pref)) {
    ans += upper_bound((fenwick[pref]).begin(), (fenwick[pref]).end(), r) -
           lower_bound((fenwick[pref]).begin(), (fenwick[pref]).end(), l);
  }
  return ans;
}
int ask(int l, int r, int l1, int r1) {
  return get(r, l1, r1) - get(l - 1, l1, r1);
}
void add(int x, int y) {
  for (; x < maxn; x += (-x & x)) {
    fenwick[x].push_back(y);
  }
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > lines(n);
  for (auto &i : lines) cin >> i.first >> i.second;
  sort((lines).begin(), (lines).end());
  for (int i = 0; i < n; ++i) add(i + 1, lines[i].second);
  for (int i = 0; i < maxn; ++i) sort((fenwick[i]).begin(), (fenwick[i]).end());
  for (int i = 1; i <= m; ++i) {
    int ans = 0;
    int alr = 0;
    int pos = 0;
    while (pos <= m) {
      int prev = alr;
      while (alr < n && lines[alr].first <= pos) ++alr;
      if (prev <= alr - 1) {
        ans += ask(prev + 1, alr - 1 + 1, pos, m);
      }
      pos += i;
    }
    cout << ans << '\n';
  }
  return 0;
}
