#include <bits/stdc++.h>
using namespace std;
int INF = INT_MAX;
long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> gr(n);
  vector<int> izm(m + 130);
  for (int i = 0; i < n; i++) {
    cin >> gr[i].first >> gr[i].second;
  }
  for (int i = 0; i < n; i++) {
    vector<pair<int, int>> lr = {gr[i]};
    int pr1 = gr[i].first;
    int d = 2;
    while (gr[i].first != 1) {
      int l = (gr[i].first + d - 1) / d;
      int r = gr[i].second / d;
      if (r >= pr1) {
        pair<int, int> k = lr[lr.size() - 1];
        lr[lr.size() - 1] = {1, k.second};
        break;
      }
      if (l == 1) {
        lr.push_back({1, r});
        break;
      }
      lr.push_back({l, r});
      pr1 = l;
      d++;
    }
    for (pair<int, int> a : lr) {
      izm[a.first]++;
      izm[a.second + 1]--;
    }
  }
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    ans += izm[i];
    cout << ans << "\n";
  }
}
