#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, int> arr[100000 + 5];
vector<int> pos[300000 + 5];
int ans[300000 + 5];
class BIT {
 public:
  int arr[300000 + 5];
  inline int lowbit(int a) { return a & -a; }
  void mdy(int now, int k) {
    if (now > n) return;
    arr[now] += k;
    mdy(now + lowbit(now), k);
  }
  int qry(int now) { return now ? arr[now] + qry(now - lowbit(now)) : 0; }
} bit;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> m >> n;
  for (int i = 1; i <= n; i++) pos[0].push_back(i);
  for (int i = 0; i < m; i++) {
    cin >> arr[i].first >> arr[i].second;
    bit.mdy(arr[i].first, 1);
    bit.mdy(arr[i].second + 1, -1);
  }
  sort(arr, arr + m);
  int now = 0;
  for (int i = 0; i < m; i++) {
    while (now < arr[i].first) {
      for (int j = 0; j < pos[now].size(); j++) {
        if (now + pos[now][j] > n) continue;
        pos[now + pos[now][j]].push_back(pos[now][j]);
        ans[pos[now][j]] += bit.qry(now + pos[now][j]) - bit.qry(now);
      }
      pos[now].clear();
      now++;
    }
    bit.mdy(arr[i].second + 1, 1);
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << '\n';
}
