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>
const int MAX_N = (int)1e5 + 123;
const double eps = 1e-6;
const int inf = (int)2e9 + 123;
using namespace std;
int n, k;
pair<int, int> a[MAX_N];
long long int ans[MAX_N];
vector<pair<int, pair<int, int> > > events;
multiset<pair<int, int> > now;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
    events.push_back(make_pair(a[i].second - k + 1, make_pair(a[i].first, 1)));
    events.push_back(make_pair(a[i].second + 1, make_pair(a[i].first, -1)));
  }
  sort(events.begin(), events.end());
  for (int i = 0; i < (int)((events).size()); i++) {
    int x = events[i].second.first;
    if (events[i].second.second == 1)
      now.insert(make_pair(x - k + 1, 1)), now.insert(make_pair(x + 1, -1));
    else
      now.erase(now.find(make_pair(x - k + 1, 1))),
          now.erase(now.find(make_pair(x + 1, -1)));
    if (i == (int)((events).size()) - 1) {
      assert(now.empty());
      continue;
    }
    if (events[i + 1].first == events[i].first) continue;
    int last = (int)2e9, cnt = 0;
    for (auto j : now) {
      if (last != int(2e9) && j.first != last && cnt) {
        ans[cnt] +=
            (j.first - last) * 1ll * (events[i + 1].first - events[i].first);
      }
      cnt += j.second;
      last = j.first;
    }
  }
  for (int i = 1; i <= n; i++)
    printf(
        "%lld"
        " ",
        ans[i]);
  return 0;
}