#include <bits/stdc++.h>
using namespace std;
const int max_value = 100000;
int main() {
  int starts[max_value + 1] = {};
  int ends[max_value + 1] = {};
  int started[max_value + 1] = {};
  int ended[max_value + 1] = {};
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int left, right;
    cin >> left >> right;
    starts[left]++;
    ends[right]++;
  }
  for (int i = 1; i <= m; i++) {
    started[i] = started[i - 1] + starts[i];
    ended[i] = ended[i - 1] + ends[i];
  }
  for (int i = 1; i <= m; i++) {
    int result = n;
    int j, k;
    for (j = i - 1, k = 0; j + 1 <= m; j += i, k += i) {
      result -= max(0, ended[j] - started[k]);
    }
    if (k <= m) {
      result -= max(0, ended[m] - started[k]);
    }
    cout << result << "\n";
  }
  return 0;
}
