#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> l(n);
  vector<int> r(n);
  for (int i = 0; i < n; i++) cin >> l[i] >> r[i];
  vector<vector<bool> > st(n, vector<bool>(m + 1, false));
  for (int i = 0; i < n; i++) {
    for (int j = l[i]; j <= r[i]; j++) {
      st[i][j] = true;
    }
  }
  for (int i = 1; i <= m; i++) {
    vector<bool> a(n, false);
    for (int j = 0; j <= m; j += i) {
      for (int k = 0; k < n; k++) a[k] = a[k] | st[k][j];
    }
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      cnt += (a[j] ? 1 : 0);
    }
    cout << cnt << endl;
  }
  return 0;
}
