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;
bool home = 1;
signed realMain();
signed main() {
  home = 0;
  if (home) {
    freopen("tony_stark", "r", stdin);
  } else {
    ios::sync_with_stdio(0);
    cin.tie(0);
  }
  realMain();
}
const int N = 100000 + 7;
int n, k;
long long sol[N];
vector<int> co;
struct pt {
  int x, y;
} a[N];
bool operator<(pt a, pt b) { return a.y < b.y; }
struct upd {
  int rw;
  int l, r;
  int sgn;
};
bool operator<(upd a, upd b) { return a.rw < b.rw; }
int fnd(int x) {
  int l = 0, r = (int)co.size() - 1;
  while (l <= r) {
    int m = (l + r) / 2;
    if (co[m] == x) return m;
    if (co[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  assert(0);
}
signed realMain() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i].x >> a[i].y;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    int go = a[i].y - k + 1;
    if (!co.empty() && go <= co.back()) go = co.back() + 1;
    for (int j = go; j <= a[i].y; j++) co.push_back(j);
  }
  vector<upd> evs;
  for (int i = 1; i <= n; i++) {
    int lft = a[i].y - k + 1, rgh = a[i].y;
    int l = fnd(lft), r = fnd(rgh);
    evs.push_back({a[i].x - k + 1, l, r, +1});
    evs.push_back({a[i].x + 1, l, r, -1});
  }
  vector<int> cnt((int)co.size()), utime;
  swap(utime, co);
  sort(evs.begin(), evs.end());
  int ret = 0;
  for (auto &it : evs) {
    int rw = it.rw;
    int l = it.l;
    int r = it.r;
    int sgn = it.sgn;
    for (int j = l; j <= r; j++) {
      sol[cnt[j]] += (rw - utime[j]);
      cnt[j] += sgn;
      utime[j] = rw;
    }
  }
  for (int j = 1; j <= n; j++) {
    cout << sol[j] << " ";
  }
  cout << "\n";
  return 0;
}