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 <typename T>
T gcd(T first, T second) {
  while (second > 0) {
    first %= second;
    swap(first, second);
  }
  return first;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class _T>
inline _T sqr(const _T &first) {
  return first * first;
}
template <class _T>
inline string tostr(const _T &a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
template <typename T>
inline void input(T &a) {
  static int ed;
  a = 0;
  while (!isdigit(ed = getchar()) && ed != '-') {
  }
  char neg = 0;
  if (ed == '-') {
    neg = 1;
    ed = getchar();
  }
  while (isdigit(ed)) {
    a = 10 * a + ed - '0';
    ed = getchar();
  }
  if (neg) a = -a;
}
template <typename T = int>
inline T nxt() {
  T res;
  input(res);
  return res;
}
void myassert(bool v) { assert(v); }
mt19937 generator;
bool check(int v) {
  if (v < 2) return false;
  for (int i = 2; i * i <= v; ++i) {
    if (v % i == 0) {
      return false;
    }
  }
  return true;
}
long long pw(long long a, long long n, long long m) {
  long long res = 1;
  while (n) {
    if (n & 1ll) {
      res = res * a % m;
    }
    a = a * a % m;
    n >>= 1;
  }
  return res;
}
long long inv(long long a, long long p) {
  long long res = 1;
  while (a > 1) {
    res = res * (p - p / a) % p;
    a = p % a;
  }
  return res;
}
struct F {
  vector<int> a;
  F(int n) { a.resize(n); }
  int get(int r) {
    int res = 0;
    for (; r >= 0; r &= r + 1, --r) {
      res += a[r];
    }
    return res;
  }
  void inc(int r) {
    for (; r < a.size(); r |= r + 1) a[r] += 1;
  }
};
bool uax(int &first, int second) {
  if (second > first) {
    first = second;
    return true;
  }
  return false;
}
bool uin(int &first, int second) {
  if (second < first) {
    first = second;
    return true;
  }
  return false;
}
struct Q {
  int first;
  unsigned pos;
  int add;
  bool operator<(const Q &r) const { return first < r.first; }
};
void solve(int test) {
  int n = nxt();
  int k = nxt();
  vector<Q> q;
  for (int i = 0; i < n; ++i) {
    int first = nxt();
    unsigned second = (unsigned)(nxt() + 1000000000);
    q.push_back(Q{first, 2 * second, 1});
    q.push_back(Q{first, (second + k) * 2 + 1, 1});
    q.push_back(Q{first + k, 2 * second, -1});
    q.push_back(Q{first + k, (second + k) * 2 + 1, -1});
  }
  multiset<unsigned> add;
  sort((q).begin(), (q).end());
  long long ans[n + 1];
  memset((ans), 0, sizeof(ans));
  for (int i = 0;;) {
    int j = i;
    while (j < q.size() && q[i].first == q[j].first) {
      if (q[j].add == 1) {
        add.insert(q[j].pos);
      } else {
        add.erase(add.find(q[j].pos));
      }
      ++j;
    }
    if (j == q.size()) break;
    int mul = q[j].first - q[i].first;
    int sum = 0;
    for (auto it = add.begin();;) {
      auto it2 = it;
      while (it2 != add.end() && *it2 / 2 == *it / 2) {
        int v = *it2 & 1;
        if (v == 0) {
          sum += 1;
        } else {
          sum -= 1;
        }
        ++it2;
      }
      if (it2 == add.end()) break;
      ans[sum] += 1ll * (mul) * (*it2 / 2 - *it / 2);
      it = it2;
    }
    i = j;
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
int main(int argc, char **argv) {
  int c = 0;
  int t = 1;
  while (t--) {
    solve(c++);
  }
  return 0;
}