#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> d(m + 1, 0);
  int l, r;
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    for (int j = 1; j <= m; j++) {
      int a, b;
      a = l / j;
      b = r / j;
      if (a < b) {
        d[j]++;
      } else if (l % j == 0 || r % j == 0) {
        d[j]++;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    cout << d[i + 1] << endl;
  }
  return 0;
}
