#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> lll(n), rrr(n);
  vector<int> num(m + 2);
  vector<int> entry(m + 2, 0);
  for (int(i) = (0); (i) < (n); (i)++) {
    cin >> lll[i] >> rrr[i];
  }
  for (int(i) = (0); (i) < (n); (i)++) {
    num[lll[i]]++, num[rrr[i] + 1]--;
  }
  for (int(i) = (1); (i) <= (m); (i)++) {
    num[i] += num[i - 1];
  }
  for (int(i) = (0); (i) < (n); (i)++) {
    int l = lll[i], r = rrr[i];
    int w = r - l + 1;
    entry[1]++;
    entry[r + 1]--;
    if (w + 1 < l) {
      entry[l]++;
      int first = (w + 1) - l % (w + 1);
      int diff = max(0, w - first);
      int end = min(l, w + 1 + (diff + 1) / 2);
      entry[end]--;
    }
  }
  int now = 0;
  for (int(i) = (1); (i) <= (m); (i)++) {
    now += entry[i];
    cout << now << endl;
  }
  return 0;
}
