#include <bits/stdc++.h>
namespace IO {
template <typename _T>
inline bool read(_T& x) {
  x = 0;
  _T y = 1;
  char c = getchar();
  while ((c < '0' || '9' < c) && c != EOF) {
    if (c == '-') y = -1;
    c = getchar();
  }
  if (c == EOF) return false;
  while ('0' <= c && c <= '9') x = x * 10 + c - '0', c = getchar();
  x *= y;
  return true;
}
template <typename _T>
inline _T input() {
  _T x = 0, y = 1;
  char c = getchar();
  while ((c < '0' || '9' < c) && c != EOF) {
    if (c == '-') y = -1;
    c = getchar();
  }
  if (c == EOF) return 0;
  while ('0' <= c && c <= '9') x = x * 10 + c - '0', c = getchar();
  x *= y;
  return x;
}
};  // namespace IO
using namespace IO;
int N, M, rt[300007];
std::vector<int> L[300007];
struct node {
  int ls, rs, sum;
};
struct chTree {
  int siz;
  node t[300007 * 20];
  chTree() : siz(0) {}
  void build(int& x, int y, int l, int r, int pos) {
    t[x = ++siz] = t[y];
    t[x].sum++;
    if (l == r) return;
    int mid = l + r >> 1;
    if (pos <= mid)
      build(t[x].ls, t[y].ls, l, mid, pos);
    else
      build(t[x].rs, t[y].rs, mid + 1, r, pos);
  }
  int query(int x, int y, int l, int r, int ql, int qr) {
    if (ql <= l && r <= qr) return t[y].sum - t[x].sum;
    int mid = l + r >> 1, ans = 0;
    if (ql <= mid) ans += query(t[x].ls, t[y].ls, l, mid, ql, qr);
    if (mid < qr) ans += query(t[x].rs, t[y].rs, mid + 1, r, ql, qr);
    return ans;
  }
} tr;
inline void init() {
  for (int i = 1; i <= M; ++i) {
    rt[i] = rt[i - 1];
    for (int l : L[i]) tr.build(rt[i], rt[i], 1, M, l);
  }
}
inline int work(int d) {
  int now = d * 2, res = 0;
  for (; now <= M; now += d) {
    res += tr.query(rt[now - d - 1], rt[now - 1], 1, M, 1, now - d);
  }
  now -= d;
  res += tr.query(rt[now - 1], rt[M], 1, M, 1, now);
  return res;
}
inline void solve() {
  for (int i = 1; i <= M; ++i) printf("%d\n", work(i));
}
int main() {
  read(N), read(M);
  int l, r;
  for (int i = 1; i <= N; ++i) {
    read(l), read(r);
    L[r].push_back(l);
  }
  init();
  solve();
  return 0;
}
