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>
template <typename T>
inline bool Chkmax(T &x, T y) {
  return x < y ? x = y, true : false;
}
template <typename T>
inline bool Chkmin(T &x, T y) {
  return y < x ? x = y, true : false;
}
namespace Main {
const int MAXN = 1e5 + 1e4, oo = 0x3f3f3f3f, MAXNK = 3e7 + 1;
int n;
int k;
struct Point {
  int x, y;
  Point(int x = 0, int y = 0) : x(x), y(y) {}
} a[MAXN];
struct Status {
  int fr, to;
  int x;
  int con;
  Status(int x = 0, int fr = 0, int to = 0, int con = 0)
      : x(x), fr(fr), to(to), con(con) {}
  inline bool operator<(const Status &a) const { return x < a.x; }
} s[MAXN * 2];
int tots;
int tsz;
int tong[MAXNK];
long long ans[MAXN];
void Solve() {
  for (int i = (0), _ = (n); i < _; ++i)
    for (int j = (0), _ = (k); j < _; ++j) tong[tsz++] = a[i].y + j;
  std::sort(tong, tong + tsz);
  tsz = std::unique(tong, tong + tsz) - tong;
  for (int i = (0), _ = (n); i < _; ++i)
    a[i].y = std::lower_bound(tong, tong + tsz, a[i].y) - tong;
  for (int i = (0), _ = (n); i < _; ++i) {
    s[tots++] = Status(a[i].x + 0, a[i].y, a[i].y + k, +1);
    s[tots++] = Status(a[i].x + k, a[i].y, a[i].y + k, -1);
  }
  std::sort(s, s + tots);
  int *sumv = tong;
  static int last[MAXNK];
  memset(sumv, 0x3f, sizeof(tong));
  for (int i = (0), _ = (tots); i < _; ++i) {
    for (int j = (s[i].fr), _ = (s[i].to); j < _; ++j) {
      if (sumv[j] == oo)
        sumv[j] = 0;
      else
        ans[sumv[j]] += s[i].x - last[j];
      last[j] = s[i].x;
      sumv[j] += s[i].con;
    }
  }
  for (int i = (1), _ = (n + 1); i < _; ++i) printf("%lld ", ans[i]);
}
void Input() {
  int x, y;
  scanf("%d%d", &n, &k);
  for (int i = (0), _ = (n); i < _; ++i) {
    scanf("%d%d", &x, &y);
    a[i] = Point(x, y);
  }
}
void Exec() {
  Input();
  Solve();
}
}  // namespace Main
int main() {
  if (fopen("D.in", "r") != NULL) {
    freopen("D.in", "r", stdin);
    freopen("D.out", "w", stdout);
  }
  Main::Exec();
  return 0;
}