#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  int c[100001] = {};
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    for (int d = 1; d <= m; d++) {
      if ((l - 1) / d != r / d) {
        c[d]++;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << c[i] << endl;
  }
  return 0;
}
