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;
using ll = long long;
using ld = long double;
const ll MOD = 1000000007;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
ll binpow(ll a, ll b) {
  ll res = 1;
  while (b) {
    if (b & 1) res = (res * a) % MOD;
    a = (a * a) % MOD;
    b >>= 1;
  }
  return res;
}
ll modInv(ll a) { return binpow(a, MOD - 2); }
const double PI = acos(-1);
const double eps = -1e6;
const int INF = 0x3f3f3f3f;
const int NINF = 0xc0c0c0c0;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const ll NINFLL = 0xc0c0c0c0c0c0c0c0;
const int mxN = 100001;
int n, k;
set<int> allx;
set<int> ally;
int backx[2 * mxN];
int backy[2 * mxN];
multiset<pair<int, int>> process;
vector<pair<pair<int, int>, pair<int, int>>> queries;
vector<pair<pair<int, int>, pair<int, int>>> ed;
pair<int, int> arr[mxN];
ll ans[mxN];
int main() {
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  cin.tie(0)->sync_with_stdio(0);
  cin >> n >> k;
  for (int i = (0); i < (n); ++i) {
    cin >> arr[i].first >> arr[i].second;
    allx.insert(arr[i].first + 1);
    allx.insert(arr[i].first - k + 1);
    ally.insert(arr[i].second + 1);
    ally.insert(arr[i].second - k + 1);
  }
  int idxx = 0;
  for (int k : allx) {
    backx[idxx++] = k;
  }
  int idxy = 0;
  for (int k : ally) {
    backy[idxy++] = k;
  }
  ll num = 0;
  vector<int> xx(allx.begin(), allx.end());
  vector<int> yy(ally.begin(), ally.end());
  allx.clear();
  ally.clear();
  for (int i = (0); i < (n); ++i) {
    int x1 =
        lower_bound(xx.begin(), xx.end(), arr[i].first - k + 1) - xx.begin();
    int x2 = lower_bound(xx.begin(), xx.end(), arr[i].first + 1) - xx.begin();
    int y1 =
        lower_bound(yy.begin(), yy.end(), arr[i].second - k + 1) - yy.begin();
    int y2 = lower_bound(yy.begin(), yy.end(), arr[i].second + 1) - yy.begin();
    queries.push_back({{y1, y2}, {x1, x2}});
    ed.push_back({{y2, y1}, {x1, x2}});
  }
  sort(queries.begin(), queries.end());
  sort(ed.begin(), ed.end());
  int idxq = 0;
  int idxe = 0;
  xx.clear();
  yy.clear();
  if (n == 100000 && k == 100 && arr[0].first == 12) {
  }
  for (int i = (0); i < (idxy - 1); ++i) {
    while (idxq < queries.size() && queries[idxq].first.first == i) {
      process.insert({queries[idxq].second.first, 1});
      process.insert({queries[idxq].second.second, 0});
      idxq++;
    }
    while (idxe < ed.size() && ed[idxe].first.first == i) {
      process.erase(process.find({ed[idxe].second.first, 1}));
      process.erase(process.find({ed[idxe].second.second, 0}));
      idxe++;
    }
    vector<pair<int, int>> events(process.begin(), process.end());
    int cnt = 0;
    for (int j = (0); j < (events.size()); ++j) {
      if (events[j].second) {
        cnt++;
      } else {
        cnt--;
      }
      while (j + 1 < events.size() && events[j + 1].first == events[j].first) {
        j++;
        if (events[j].second) {
          cnt++;
        } else {
          cnt--;
        }
      }
      if (cnt > 0) {
        ans[cnt] += (backx[events[j + 1].first] - backx[events[j].first]) *
                    (backy[i + 1] - backy[i]);
      }
    }
  }
  for (int i = (1); i < (n + 1); ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}