#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
template <class T>
struct segment_tree {
  int n;
  vector<T> x;
  segment_tree(int n_) {
    n = 1;
    int logn = 0;
    while (n < n_) n *= 2, logn++;
    x.assign(n * logn, (T)0);
  }
  void add(int a, int b, T diff, int k, int l, int r) {
    if (r <= a or b <= l) return;
    if (a <= l and r <= b)
      x[k] += diff;
    else {
      add(a, b, diff, k * 2 + 1, l, (l + r) / 2);
      add(a, b, diff, k * 2 + 2, (l + r) / 2, r);
    }
  }
  void add(int a, int b, T diff) { add(a, b, diff, 0, 0, n); }
  T get(int k) {
    k += n - 1;
    T s = (T)0;
    while (1) {
      s += x[k];
      if (k == 0) break;
      k = (k - 1) / 2;
    }
    return s;
  }
};
template <class T>
struct imos {
  vector<T> v;
  int cur_i;
  T cur_sum;
  imos(int n) {
    v.assign(n + 1, 0);
    cur_i = 0;
    cur_sum = 0;
  }
  void add(int l, int r, T diff) {
    v[l] += diff;
    v[r] -= diff;
  }
  T get(int i) {
    for (; cur_i < i; cur_i++, cur_sum += v[cur_i])
      ;
    return cur_sum;
  }
};
int main() {
  int N, M;
  cin >> N >> M;
  imos<long long> st(M + 1);
  for (int i = 0; i < (int)(N); ++i) {
    int l, r;
    cin >> l >> r;
    r++;
    int dmax = r - l;
    st.add(1, r - l + 1, 1);
    for (int t = 1;; t++) {
      int dmin = l / t, dmax = r / t;
      if (r % t != 0) dmax++;
      dmin = max(dmin, r - l + 1);
      if (dmin >= dmax) break;
      st.add(dmin, dmax, 1);
    }
  }
  for (int i = 1; i <= M; i++) {
    cout << st.get(i) << endl;
  }
  return 0;
}
