#include <bits/stdc++.h>
using namespace std;
struct pairhash {
 public:
  template <typename T, typename U>
  size_t operator()(const pair<T, U> &x) const {
    size_t seed = hash<T>()(x.first);
    return hash<U>()(x.second) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
  }
};
const int inf = 1e9 + 9;
const long long mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1);
int n, m;
int l[300100], r[300100];
void solve() {
  vector<pair<int, int> > vec(n);
  for (int i = 0; i < n; i++) {
    vec[i] = pair<int, int>(l[i], r[i]);
  }
  sort((vec).begin(), (vec).end());
  for (int d = 1; d <= m; d++) {
    int res = 0, idx = 0;
    for (int i = d; i <= m; i += d) {
      while (idx < n && vec[idx].first <= i) {
        if (i <= vec[idx].second) res++;
        idx++;
      }
    }
    cout << res << '\n';
  }
}
void input() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> l[i] >> r[i];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  input();
  solve();
}
