#include <bits/stdc++.h>
using namespace std;
int n;
struct Domino {
  int x, h, i;
  Domino(int x, int h, int i) : x(x), h(h), i(i) {}
  bool operator<(const Domino& d) const { return x < d.x; }
};
struct SegmentTree {
  int n;
  vector<int> v;
  SegmentTree(int n) : n(n) { v.assign(4 * n, -1); }
  int query(int lq, int rq) { return query(1, 0, n - 1, lq, rq); }
  int query(int i, int x, int y, int lq, int rq) {
    if (lq > y || rq < x) return -1;
    if (lq <= x && rq >= y) return v[i];
    return max(query(2 * i, x, (x + y) / 2, lq, rq),
               query(2 * i + 1, (x + y) / 2 + 1, y, lq, rq));
  }
  void update(int q, int val) { update(1, 0, n - 1, q, val); }
  void update(int i, int x, int y, int q, int val) {
    if (q > y || q < x) return;
    if (x == y) {
      v[i] = val;
    } else {
      update(2 * i, x, (x + y) / 2, q, val);
      update(2 * i + 1, (x + y) / 2 + 1, y, q, val);
      v[i] = max(v[2 * i], v[2 * i + 1]);
    }
  }
};
int binary_search(vector<Domino>& v, int val) {
  int lo = 0;
  int hi = n - 1;
  while (lo < hi) {
    int mid = (lo + hi + 1) / 2;
    if (v[mid].x >= val) {
      hi = mid - 1;
    } else {
      lo = mid;
    }
  }
  return lo;
}
int main() {
  scanf("%d", &n);
  vector<Domino> v;
  for (int i = 0; i < n; i++) {
    int x, h;
    scanf("%d%d", &x, &h);
    v.push_back(Domino(x, h, i));
  }
  sort(v.begin(), v.end());
  SegmentTree st = SegmentTree(n);
  vector<int> ans(n);
  for (int i = n - 1; i >= 0; i--) {
    st.update(i, i);
    int direct = binary_search(v, v[i].x + v[i].h);
    int far = st.query(i, direct);
    ans[v[i].i] = far - i + 1;
    st.update(i, far);
  }
  for (int i = 0; i < n; i++) {
    printf("%d%c", ans[i], i == n - 1 ? '\n' : ' ');
  }
  return 0;
}
