#include <bits/stdc++.h>
using namespace std;
template <typename T>
struct BIT {
  vector<T> data;
  BIT() {}
  BIT(int n) : data(n + 1, 0) {}
  void init(int n) { data.assign(n + 1, 0); }
  T sum(int ed) const {
    for (T res(0);; ed &= ed - 1)
      if (ed)
        res += data[ed];
      else
        return res;
  }
  void add(int i, const T& x) {
    for (++i; i < (int)data.size(); i += i & -i) data[i] += x;
  }
};
BIT<int> bit(100000 + 5);
void go(int a, int b) {
  bit.add(0, 1);
  bit.add(b - a + 1, -1);
  int c1 = b - a + 1;
  int c2 = b + 1;
  for (int i = 1;; ++i) {
    int aa = (a + i - 1) / i;
    int bb = b / i;
    int lb = max(aa, c1 + 1);
    int ub = min(bb, c2 - 1);
    if (lb > ub) break;
    if (aa > bb) continue;
    bit.add(lb - 1, 1);
    bit.add(ub, -1);
    c2 = lb;
  }
}
int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (int)(n); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    go(a, b);
  }
  for (int i = 1; i <= m; ++i) {
    printf("%d\n", bit.sum(i));
  }
  return 0;
}
