#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = MOD + 1;
const long double EPS = 1e-12;
template <class T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <class T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
int main() {
  cin.sync_with_stdio(false);
  cout << fixed << setprecision(10);
  int n, m;
  cin >> n >> m;
  vector<int> s(m + 2);
  for (int lp = (int)(0); lp < (int)(n); lp++) {
    int l, r;
    cin >> l >> r;
    int pre = INF;
    for (int i = (int)(1); i < (int)(INF); i++) {
      int a = l / i + (l % i == 0 ? 0 : 1);
      int b = r / i;
      if (b >= pre) b = pre - 1;
      s[a] += 1;
      s[b + 1] -= 1;
      pre = a;
      if (a == 1) break;
    }
  }
  vector<int> ans(m + 1);
  for (int i = (int)(0); i < (int)(m); i++) ans[i + 1] = ans[i] + s[i + 1];
  for (int i = (int)(0); i < (int)(m); i++) cout << ans[i + 1] << endl;
  return 0;
}
