#include <bits/stdc++.h>
using namespace std;
struct xx {
  int x, y, yy, k;
} a[1000003];
int n, k, kk, kkk, tot;
int tong[30000003], ff[30000003];
long long ans[200003];
inline bool cmp(xx x, xx y) {
  if (x.x == y.x) {
    return x.y < y.y;
  }
  return x.x < y.x;
}
inline int find(int x) {
  int l = 1, r = tot;
  while (l < r) {
    int mid = (l + r) / 2;
    if (ff[mid] < x) {
      l = mid + 1;
    } else {
      r = mid;
    }
  }
  return l;
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    a[++kk].x = x - k + 1;
    a[kk].y = y - k + 1;
    a[kk].yy = y;
    a[kk].k = 1;
    a[++kk].x = x + 1;
    a[kk].y = y - k + 1;
    a[kk].yy = y;
    a[kk].k = -1;
    for (int j = y - k + 1; j <= y; j++) {
      ff[++kkk] = j;
    }
  }
  sort(a + 1, a + 1 + kk, cmp);
  sort(ff + 1, ff + 1 + kkk);
  tot = 1;
  for (int i = 2; i <= kkk; i++) {
    if (ff[i] != ff[tot]) {
      ff[++tot] = ff[i];
    }
  }
  for (int i = 1; i <= kk; i++) {
    for (int j = a[i].y, k = find(a[i].y); j <= a[i].yy; j++) {
      if (j != a[i].y) {
        k++;
      }
      ans[tong[k]] -= 1000000000 - (long long)a[i].x;
      ans[tong[k] += a[i].k] += 1000000000 - (long long)a[i].x;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
