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 inf = 2e9;
const long long Inf = 1e10;
const int P = 1e9 + 7;
const int N = 100005;
template <typename T>
inline T IN() {
  T x;
  int ch, f;
  for (ch = getchar(); ch != -1 && (ch < 48 || ch > 57); ch = getchar())
    f = (ch == '-');
  for (; ch >= 48 && ch <= 57; ch = getchar())
    x = (x << 1) + (x << 3) + ch - '0';
  return f ? (-x) : x;
}
template <typename T>
inline int chkmin(T &a, const T &b) {
  if (b < a) return a = b, 1;
  return 0;
}
template <typename T>
inline int chkmax(T &a, const T &b) {
  if (b > a) return a = b, 1;
  return 0;
}
void renew(int &x, const int &y) {
  if ((x += y) >= P) x -= P;
}
int Pow(int x, int y, int p) {
  int a = 1;
  for (; y; y >>= 1, x = (long long)x * x % p)
    if (y & 1) a = (long long)a * x % p;
  return a;
}
bool st;
int val[N], ind[N], pre[300 * N], sum[300 * N];
int m, n, L;
struct node {
  int x, y, f;
} A[N * 2];
long long ans[N];
bool en;
inline int cmp(const node &a, const node &b) { return a.x < b.x; }
int main() {
  scanf("%d%d", &n, &L);
  for (int i = (int)(1); i <= (int)(n); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    A[++m] = (node){x - L + 1, y, 1};
    A[++m] = (node){x + 1, y, -1};
    val[i] = y;
  }
  sort(val + 1, val + n + 1);
  *val = unique(val + 1, val + n + 1) - (val + 1);
  for (int i = (int)(1); i <= (int)(*val); i++) {
    if (i == 1) {
      ind[i] = 1;
      continue;
    } else {
      ind[i] = ind[i - 1] + min(L, val[i] - val[i - 1]);
    }
  }
  for (int i = (int)(1); i <= (int)(m); i++) {
    A[i].y = lower_bound(val + 1, val + *val + 1, A[i].y) - val;
  }
  sort(A + 1, A + m + 1, cmp);
  memset(sum, -1, sizeof sum);
  for (int i = (int)(1); i <= (int)(m); i++) {
    int j = i;
    while (A[j].x == A[i].x) ++j;
    --j;
    for (int k = (int)(i); k <= (int)(j); k++) {
      int u = ind[A[k].y], v = A[k].f;
      for (int y = (int)(u); y < (int)(u + L); y++) {
        if (sum[y] == -1) {
          sum[y] = v;
          pre[y] = A[i].x;
        } else {
          ans[sum[y]] += A[i].x - pre[y];
          sum[y] += v;
          pre[y] = A[i].x;
        }
      }
    }
    i = j;
  }
  for (int i = (int)(1); i <= (int)(n); i++) printf("%lld ", ans[i]);
  puts("");
  return 0;
}