#include <bits/stdc++.h>
using namespace std;
struct FenwickTree {
  int n;
  vector<long long> dat;
  FenwickTree(int _n) : n(_n), dat(_n + 1, 0ll) {}
  FenwickTree(int _n, long long val) : n(_n), dat(_n + 1, 0ll) {
    for (int i = 0; i < n; i++) add(i, val);
  }
  void add(int idx, long long val) {
    for (idx++; idx <= n; idx += idx & -idx) dat[idx] += val;
  }
  long long query(int l, int r) {
    long long res = 0;
    r++;
    for (; r; r -= r & -r) res += dat[r];
    for (; l; l -= l & -l) res -= dat[l];
    return res;
  }
};
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.second - a.first <= b.second - b.first)
    return true;
  else
    return false;
}
int main(void) {
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > A(n);
  for (long long i = 0; i < n; i++) {
    cin >> A[i].first >> A[i].second;
  }
  sort(A.begin(), A.end(), comp);
  FenwickTree ft(m + 2);
  long long idx = 0;
  for (long long d = 1; d < m + 1; d++) {
    long long 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 (long long i = 0; i < m + 1; i += d) {
      count += ft.query(0, i);
    }
    count += n - idx;
    cout << count << endl;
  }
}
