#include <bits/stdc++.h>
using namespace std;
struct Segm {
  int x, y, ind;
  bool operator<(const Segm &A) const { return y < A.y; }
} segm[200005], Ev[200005 * 20];
int aib[200005], len, ans[200005];
inline void upd(int p, int val) {
  for (int i = p; i; i -= (i & (-i))) aib[i] += val;
}
inline int qry(int p) {
  int sol = 0;
  for (int i = p; i < 200005; i += (i & (-i))) sol += aib[i];
  return sol;
}
int main() {
  int n, m, i, j, d;
  cin >> n >> m;
  for (i = 1; i <= n; ++i) cin >> segm[i].x >> segm[i].y;
  sort(segm + 1, segm + n + 1);
  for (d = 1; d <= m; ++d) {
    for (i = d; i <= m; i += d) {
      Ev[++len].y = i - 1;
      Ev[len].x = i - d + 1;
      Ev[len].ind = d;
    }
    i -= d;
    if (i < m) {
      Ev[++len].y = m;
      Ev[len].x = i + 1;
      Ev[len].ind = d;
    }
  }
  sort(Ev + 1, Ev + len + 1);
  for (i = j = 1; i <= len; ++i) {
    for (; j <= n && segm[j].y <= Ev[i].y; upd(segm[j++].x, 1))
      ;
    ans[Ev[i].ind] += qry(Ev[i].x);
  }
  for (i = 1; i <= m; ++i) cout << n - ans[i] << "\n";
  return 0;
}
