#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  vector<long long int> l(n);
  vector<long long int> r(n);
  for (long long int i = 0; i < (n); i++) {
    cin >> l[i] >> r[i];
  }
  vector<set<long long int>> ans(m + 1, set<long long int>());
  for (long long int i = 0; i < (n); i++) {
    for (long long int j = l[i]; j <= r[i]; j++) {
      ans[j].insert(i);
    }
  }
  for (long long int d = m / 2 + 1; d <= m; d++) {
    for (auto e : ans[0]) ans[d].insert(e);
  }
  for (long long int d = m / 2; 0 < d; d--) {
    for (auto e : ans[2 * d]) ans[d].insert(e);
    if (3 * d <= m) {
      for (auto e : ans[3 * d]) ans[d].insert(e);
    }
  }
  for (long long int i = 0; i < (m); i++) cout << ans[i + 1].size() << endl;
  return 0;
}
