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;
template <class T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
const int NANA = -427394241, maxN = 1e5 + 5, maxK = 305;
int N, K;
struct Event {
  int x, y, tp;
  Event() {}
  Event(int x, int y, int tp) : x(x), y(y), tp(tp) {}
  void print() { fprintf(stderr, "x = %d y = %d tp = %d", x, y, tp); }
} ev[maxN << 1];
int Hash[maxN * maxK], totHash = 0;
void init() {
  cin >> N >> K;
  for (int i = (1), _end = (N); i <= _end; ++i) {
    int x, y;
    cin >> x >> y;
    ev[i * 2 - 1] = Event(x, y, +1);
    ev[i * 2] = Event(x + K, y, -1);
    for (int k = (0), _end = (K - 1); k <= _end; ++k) Hash[++totHash] = y + k;
  }
  sort(Hash + 1, Hash + totHash + 1);
  totHash = unique(Hash + 1, Hash + totHash + 1) - Hash - 1;
  N <<= 1;
  for (int i = (1), _end = (N); i <= _end; ++i) {
    ev[i].y = lower_bound(Hash + 1, Hash + totHash + 1, ev[i].y) - Hash;
  }
}
int *last, cnt[maxN * maxK];
long long ans[maxN];
bool cmp(const Event &x, const Event &y) {
  return x.x < y.x || (x.x == y.x && x.y < y.y);
}
void solve() {
  sort(ev + 1, ev + N + 1, cmp);
  last = Hash;
  for (int i = (0), _end = (totHash); i <= _end; ++i) last[i] = NANA;
  for (int i = (1), _end = (N); i <= _end; ++i) {
    int x = ev[i].x, y = ev[i].y, tp = ev[i].tp;
    for (int k = (0), _end = (K - 1); k <= _end; ++k) {
      if (last[y + k] != NANA) {
        ans[cnt[y + k]] += x - last[y + k];
      }
      cnt[y + k] += tp;
      last[y + k] = x;
    }
  }
  for (int i = (1), _end = (N >> 1); i <= _end; ++i) cout << ans[i] << ' ';
}
int main() {
  ios::sync_with_stdio(false);
  init();
  solve();
  return 0;
}