#include <bits/stdc++.h>
const int INF = 0x7F7F7F7F;
const double EPS = 1e-10;
const long long mod7 = 1e9 + 7;
const long long mod9 = 1e9 + 9;
using namespace std;
inline long long rit() {
  long long f = 0, key = 1;
  char c;
  do {
    c = getchar();
    if (c == '-') key = -1;
  } while (c < '0' || c > '9');
  do {
    f = f * 10 + c - '0';
    c = getchar();
  } while (c >= '0' && c <= '9');
  return f * key;
}
inline void fprt(double f) { printf("%.08lf", f); }
void init() {}
const int Z = 100005;
int n, m;
int tree[Z * 4], tag[Z * 4];
void modify(int p, int l, int r, int ql, int qr, int cc) {
  if (l == ql && r == qr) {
    tree[p] += cc;
    return;
  }
  int mid = (l + r) >> 1;
  tag[p] = 1;
  if (qr <= mid)
    modify(p << 1, l, mid, ql, qr, cc);
  else if (ql > mid)
    modify(p << 1 | 1, mid + 1, r, ql, qr, cc);
  else {
    modify(p << 1, l, mid, ql, mid, cc);
    modify(p << 1 | 1, mid + 1, r, mid + 1, qr, cc);
  }
}
int query(int p, int l, int r, int x) {
  if (l == r) return tree[p];
  int mid = (l + r) >> 1;
  if (!tag[p]) return tree[p];
  if (x <= mid)
    return tree[p] + query(p << 1, l, mid, x);
  else
    return tree[p] + query(p << 1 | 1, mid + 1, r, x);
}
map<pair<int, int>, int> ccm;
void read() {
  int l, r, t, nl, nr;
  n = rit(), m = rit();
  for (int i = 0; i < n; i++) {
    l = rit(), r = rit();
    ccm[make_pair(l, r)]++;
  }
  for (auto f : ccm) {
    l = nl = f.first.first;
    r = nr = f.first.second;
    t = 1;
    nl = l;
    nr = r;
    while (1) {
      modify(1, 1, m, nl, nr, f.second);
      if (nl == 1) break;
      do {
        t = max(r / (nl - 1), (l + (nl - 2)) / (nl - 1));
        nr = min(r / t, nl - 1);
        nl = (l + (t - 1)) / t;
      } while (nl > nr);
    }
  }
}
void solve() {
  for (int i = 1; i <= m; i++) {
    printf("%d\n", query(1, 1, m, i));
  }
}
int main() {
  int nn = 1;
  while (nn--) {
    init(), read(), solve();
  }
  return 0;
}
