#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
pair<int, int> lr[(int)1e5 * 3];
vector<int> vec[(int)1e5 + 1];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> lr[i].second >> lr[i].first;
    lr[i].first = lr[i].first - lr[i].second + 1;
  }
  sort(lr, lr + n);
  for (int i = 0; i < n; i++) {
    vec[lr[i].second].push_back(i);
  }
  for (int i = 1; i <= m; i++) {
    ans = 0;
    int p = lower_bound(lr, lr + n, make_pair(i, 0)) - lr;
    ans = n - p;
    for (int j = 0; j < p; j++) {
      if (lr[j].second % i + lr[j].first - 1 >= i || !(lr[j].second % i)) {
        ans++;
      }
    }
    cout << ans << endl;
  }
}
