#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1 << 28;
int main(int argc, char **argv) {
  int N, M;
  cin >> N >> M;
  vector<pair<int, int> > lr;
  lr.resize(N);
  for (int i = (0); i < (N); ++i) cin >> lr[i].first >> lr[i].second;
  for (int i = (1); i < (M + 1); ++i) {
    long long ans = 0;
    for (int j = (0); j < (N); ++j)
      if (i <= lr[j].second and
          lr[j].second % i <= lr[j].second - lr[j].first) {
        ans++;
      }
    cout << ans << endl;
  }
  return 0;
}
