#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
struct node {
  int l, r, sum, f, siz;
} e[maxn * 4];
void up(int x) { e[x].sum = e[x << 1].sum + e[x << 1 | 1].sum; }
void down(int x) {
  if (e[x].f == 0) return;
  e[x << 1].sum += e[x].f * e[x << 1].siz;
  e[x << 1 | 1].sum += e[x].f * e[x << 1 | 1].siz;
  e[x << 1].f += e[x].f;
  e[x << 1 | 1].f += e[x].f;
  e[x].f = 0;
}
void built(int x, int l, int r) {
  e[x].l = l, e[x].r = r;
  e[x].siz = (r - l + 1);
  e[x].f = 0;
  if (l == r) {
    e[x].sum = 0;
    return;
  }
  int mid = (l + r) / 2;
  built(x << 1, l, mid), built(x << 1 | 1, mid + 1, r);
  up(x);
}
void update(int x, int LL, int RR, int v) {
  if (e[x].l >= LL && e[x].r <= RR) {
    e[x].sum += e[x].siz * v;
    e[x].f += v;
    return;
  }
  down(x);
  int mid = (e[x].l + e[x].r) / 2;
  if (LL <= mid) update(x << 1, LL, RR, v);
  if (RR > mid) update(x << 1 | 1, LL, RR, v);
  up(x);
}
int query(int x, int pos) {
  if (e[x].l == e[x].r) {
    return e[x].sum;
  }
  down(x);
  int mid = (e[x].l + e[x].r) / 2;
  if (pos <= mid)
    return query(x << 1, pos);
  else
    return query(x << 1 | 1, pos);
}
int n, m, l, r;
int main() {
  scanf("%d%d", &n, &m);
  built(1, 1, m);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &l, &r);
    int t = r - l + 1;
    update(1, 1, t, 1);
    update(1, max(l, t + 1), r, 1);
  }
  for (int i = 1; i <= m; i++) {
    printf("%d\n", query(1, i));
  }
}
