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 = 100100;
int i, j, k, n, m, ch, ff, nx, ny, tmp, x, y, nn;
long long ans[N];
int num[N << 1], Lsx[N << 1], Lsy[N << 1];
struct cc {
  int l, r, x, fg;
} A[N << 1];
void R(int &x) {
  ff = x = 0;
  ch = getchar();
  while (ch < '0' || '9' < ch) {
    if (ch == '-') ff = 1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  if (ff) x = -x;
}
bool cmp(const cc &a, const cc &b) { return a.x < b.x; }
int findy(int x) {
  int l = 1, r = ny, mid;
  while (l < r) {
    mid = (l + r) >> 1;
    if (Lsy[mid] == x) return mid;
    if (Lsy[mid] < x)
      l = mid + 1;
    else
      r = mid - 1;
  }
  return l;
}
void W(long long x) {
  if (x >= 10) W(x / 10);
  putchar(x % 10 + '0');
}
int main() {
  R(n);
  R(m);
  for (i = 1; i <= n; i++) {
    R(x);
    R(y);
    A[++nn].l = y - m + 1;
    A[nn].r = y + 1;
    A[nn].x = x - m + 1;
    A[nn].fg = 1;
    A[++nn].l = y - m + 1;
    A[nn].r = y + 1;
    A[nn].x = x + 1;
    A[nn].fg = -1;
    Lsx[++nx] = x - m + 1;
    Lsx[++nx] = x + 1;
    Lsy[++ny] = y - m + 1;
    Lsy[++ny] = y + 1;
  }
  sort(Lsx + 1, Lsx + nx + 1);
  sort(Lsy + 1, Lsy + ny + 1);
  tmp = nx;
  Lsx[nx + 1] = Lsx[nx] + 1;
  nx = 0;
  for (i = 1; i <= tmp; i++)
    if (Lsx[i] != Lsx[i + 1]) Lsx[++nx] = Lsx[i];
  tmp = ny;
  Lsy[ny + 1] = Lsy[ny] + 1;
  ny = 0;
  for (i = 1; i <= tmp; i++)
    if (Lsy[i] != Lsy[i + 1]) Lsy[++ny] = Lsy[i];
  sort(A + 1, A + nn + 1, cmp);
  for (i = 1; i <= nn; i++) {
    A[i].l = findy(A[i].l);
    A[i].r = findy(A[i].r);
    for (j = A[i].l; j < A[i].r; j++) {
      if (num[j])
        ans[num[j]] -= (long long)(Lsx[nx] - A[i].x) * (Lsy[j + 1] - Lsy[j]);
      num[j] += A[i].fg;
      if (num[j])
        ans[num[j]] += (long long)(Lsx[nx] - A[i].x) * (Lsy[j + 1] - Lsy[j]);
    }
  }
  for (i = 1; i <= n; i++) W(ans[i]), putchar(' ');
  puts("");
}