#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int l[n + 1], r[n + 1];
  for (int i = 0; i <= n; i++) {
    cin >> l[i] >> r[i];
  }
  int s[m];
  int a;
  for (int i = 0; i < m; i++) s[i] = 0;
  for (int i = 0; i <= n; i++) {
    a = r[i] - l[i];
    for (int j = 0; j < a; j++) {
      s[j] += 1;
    }
  }
  for (int i = 0; i < m; i++) {
    cout << s[i] << endl;
  }
  return 0;
}
