Problem: Snow Queen told Kay to form a word "eternity" using pieces of ice. Kay is eager to deal with the task, because he will then become free, and Snow Queen will give him all the world and a pair of skates.

Behind the palace of the Snow Queen there is an infinite field consisting of cells. There are n pieces of ice spread over the field, each piece occupying exactly one cell and no two pieces occupying the same cell. To estimate the difficulty of the task Kay looks at some squares of size k × k cells, with corners located at the corners of the cells and sides parallel to coordinate axis and counts the number of pieces of the ice inside them.

This method gives an estimation of the difficulty of some part of the field. However, Kay also wants to estimate the total difficulty, so he came up with the following criteria: for each x (1 ≤ x ≤ n) he wants to count the number of squares of size k × k, such that there are exactly x pieces of the ice inside.

Please, help Kay estimate the difficulty of the task given by the Snow Queen.

Input

The first line of the input contains two integers n and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤ 300) — the number of pieces of the ice and the value k, respectively. Each of the next n lines contains two integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — coordinates of the cell containing i-th piece of the ice. It's guaranteed, that no two pieces of the ice occupy the same cell.

Output

Print n integers: the number of squares of size k × k containing exactly 1, 2, ..., n pieces of the ice.

Example

Input

5 3
4 5
4 6
5 5
5 6
7 7


Output

10 8 1 4 0 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 100500;
const int M = 305 * N;
int X[N], Y[N];
int CY[N];
int MY[N];
int cpt = 0;
int last[M];
int val[M];
long long cnt[N];
void upd(int x, int y, int d) {
  cnt[val[y]] += (x - last[y]);
  last[y] = x;
  val[y] += d;
}
int k;
int comp(int y) {
  int prv = upper_bound(CY, CY + cpt, y) - CY - 1;
  if (prv == -1 || y - CY[prv] >= k)
    return -1;
  else
    return y - CY[prv] + MY[prv];
}
struct ev {
  int x, y, d;
  ev(int _x, int _y, int _d) { x = _x, y = _y, d = _d; }
  ev() {}
  friend bool operator<(ev a, ev b) { return a.x < b.x; }
};
ev E[2 * N];
int main() {
  int n;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &X[i], &Y[i]);
  }
  memcpy(CY, Y, sizeof(int) * n);
  sort(CY, CY + n);
  cpt = unique(CY, CY + n) - CY;
  for (int i = 1; i < cpt; i++) {
    MY[i] = MY[i - 1] + min(k, CY[i] - CY[i - 1]);
  }
  for (int i = 0; i < n; i++) {
    E[2 * i] = ev(X[i], Y[i], 1);
    E[2 * i + 1] = ev(X[i] + k, Y[i], -1);
  }
  sort(E, E + 2 * n);
  for (ev e : E) {
    int cy = comp(e.y);
    for (int y = cy; y < cy + k; y++) upd(e.x, y, e.d);
  }
  for (int i = 1; i <= n; i++) {
    printf("%lld ", cnt[i]);
  }
  printf("\n");
}