#include <bits/stdc++.h>
using namespace std;
int N, K;
int x[100000], y[100000];
int ex[200000], ey[200000], cid[200000], dif[200000];
bool cmp(int a, int b) {
  if (ex[a] == ex[b]) return dif[a] < dif[b];
  return ex[a] < ex[b];
}
long long tot[100001];
long long cur[100001];
long long lastUpdate[100001];
int sty[30000001];
int val[30000001];
int main() {
  cin >> N >> K;
  int sz = 0;
  for (int i = 0; i < N; i++) {
    cin >> x[i] >> y[i];
    ex[2 * i] = x[i] - K + 1, ex[2 * i + 1] = x[i] + 1;
    ey[2 * i] = ey[2 * i + 1] = y[i];
    cid[2 * i] = 2 * i;
    cid[2 * i + 1] = 2 * i + 1;
    dif[2 * i] = 1, dif[2 * i + 1] = -1;
  }
  sort(y, y + N);
  int iStart = y[0];
  int iEnd = y[0] + K - 1;
  for (int i = 1; i < N; i++) {
    if (y[i] <= iEnd)
      iEnd = y[i] + K - 1;
    else {
      for (int j = iStart; j <= iEnd; j++) sty[sz++] = j;
      iStart = y[i];
      iEnd = y[i] + K - 1;
    }
  }
  for (int j = iStart; j <= iEnd; j++) sty[sz++] = j;
  sort(cid, cid + 2 * N, cmp);
  for (int i = 0; i <= N; i++) lastUpdate[i] = -2000000000;
  for (int i = 0; i < 2 * N; i++) {
    int j = cid[i];
    int locy = lower_bound(sty, sty + sz, ey[j]) - sty;
    for (int c = locy; c < locy + K; c++) {
      tot[val[c]] += (ex[j] - lastUpdate[val[c]]) * cur[val[c]];
      cur[val[c]]--;
      lastUpdate[val[c]] = ex[j];
      val[c] += dif[j];
      tot[val[c]] += (ex[j] - lastUpdate[val[c]]) * cur[val[c]];
      cur[val[c]]++;
      lastUpdate[val[c]] = ex[j];
    }
  }
  for (int i = 1; i <= N; i++) cout << tot[i] << '\n';
}
