#include <bits/stdc++.h>
using namespace std;
const int N = 300000 + 9;
int n, m;
struct Event {
  int l, r, len;
  inline Event() {}
  inline Event(int _l, int _r) {
    l = _l;
    r = _r;
    len = r - l + 1;
  }
  inline bool operator<(const Event &B) const { return len < B.len; }
} e[N];
class Fenwick_Tree {
  int cnt[N];

 public:
  inline void modify(int l, int r) {
    for (int i = l - 1; i; i -= lowbit(i)) cnt[i]--;
    for (int i = r; i; i -= lowbit(i)) cnt[i]++;
  }
  inline int query(int p) {
    int ret = 0;
    for (int i = p; i <= m; i += lowbit(i)) ret += cnt[i];
    return ret;
  }

 private:
  inline int lowbit(int x) { return x & -x; }
} BIT;
inline int read() {
  char c = getchar();
  int f = 1, ret = 0;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    ret = ret * 10 + c - '0';
    c = getchar();
  }
  return ret * f;
}
int main() {
  n = read();
  m = read() + 1;
  for (int i = 1, l, r; i <= n; i++) {
    l = read() + 1;
    r = read() + 1;
    e[i] = Event(l, r);
  }
  sort(e + 1, e + 1 + n);
  for (int d = 1, p = 1; d < m; d++) {
    for (; p <= m && e[p].len == d - 1; p++) {
      n--;
      BIT.modify(e[p].l, e[p].r);
    }
    int vout = 0;
    for (int i = 1; i <= m; i += d) vout += BIT.query(i);
    printf("%d\n", vout + n);
  }
  return 0;
}
