#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(m);
  while (n-- > 0) {
    int l, r;
    cin >> l >> r;
    int u = r / (r - l + 1);
    if (u < 2) {
      for (int i = 1; i <= r; i++) v[i - 1] += 1;
    } else {
      for (int i = 1; i <= r / u; i++) v[i - 1] += 1;
      for (int j = 1; j < u; j++)
        for (int i = (l - 1) / j + 1; i <= r / j; i++) v[i - 1] += 1;
    }
  }
  for (auto e : v) cout << e << endl;
}
