#include <bits/stdc++.h>
using namespace std;
int BIT_calc(vector<int> &v, int x) {
  int ret = 0;
  for (int i = x; i > 0; i -= i & -i) {
    ret += v[i];
  }
  return ret;
}
void BIT_add(vector<int> &v, int w, int s, int n) {
  for (int i = s; i <= n; i += i & -i) {
    v[i] += w;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> l(n), r(n);
  vector<vector<int> > x(m + 1);
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    int d = r[i] - l[i];
    x[d].push_back(i);
  }
  for (int d = 1; d <= m; d++) {
    int result = n;
    vector<int> station(m + 10, 0);
    for (int i = 0; i < d - 1; i++) {
      for (int j = 0; j < x[i].size(); j++) {
        int z = x[i][j];
        BIT_add(station, 1, l[z], m);
        BIT_add(station, -1, r[z] + 1, m);
        result--;
      }
    }
    for (int i = d; i <= m; i += d) {
      result += BIT_calc(station, i);
    }
    cout << result << endl;
  }
  return 0;
}
