#include <bits/stdc++.h>
using namespace std;
class FenwickTree {
 private:
  int n;
  vector<int> dat;

 public:
  FenwickTree(int _n) : n(_n), dat(_n + 1, 0) {}
  FenwickTree(int _n, int init) : n(_n), dat(_n + 1, 0) {
    for (int i = 0; i <= _n; i++) {
      add(i, init);
    }
  }
  void add(int idx, int value) {
    idx++;
    while (idx <= n) {
      dat[idx] += value;
      idx += idx & -idx;
    }
  }
  int query(int l, int r) {
    int ans = 0;
    r++;
    while (r > 0) {
      ans += dat[r];
      r -= r & -r;
    }
    while (l > 0) {
      ans -= dat[l];
      l -= l & -l;
    }
    return ans;
  }
};
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.second - a.first <= b.second - b.first)
    return true;
  else
    return false;
}
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > A(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i].first >> A[i].second;
  }
  sort(A.begin(), A.end(), comp);
  FenwickTree ft(m + 2);
  int idx = 0;
  for (int d = 1; d < m + 1; d++) {
    int count = 0;
    for (; idx < n && A[idx].second - A[idx].first < d; idx++) {
      ft.add(A[idx].first, 1);
      ft.add(A[idx].second + 1, -1);
    }
    for (int i = 0; i < m + 1; i += d) {
      count += ft.query(0, i);
    }
    count += n - idx;
    cout << count << endl;
  }
}
