#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int inf = 1e8;
struct domino {
  int x, h, i;
};
domino dom[N];
int ans[N];
int n;
struct segment_tree {
  struct node {
    int who = -1;
  };
  vector<node> st;
  node z;
  int n;
  node unite(node a, node b) {
    node tmp;
    tmp.who = max(a.who, b.who);
    return tmp;
  }
  segment_tree(int _n = 1) {
    n = _n;
    st.resize(2 * n);
  }
  void update(int u, int l, int r, int kth, int who) {
    if (l == r) {
      st[u].who = who;
      return;
    }
    if (kth <= (l + r) / 2) {
      update((u + 1), l, (l + r) / 2, kth, who);
    } else {
      update((u + (((l + r) / 2 - l + 1) << 1)), (l + r) / 2 + 1, r, kth, who);
    }
    st[u] = unite(st[(u + 1)], st[(u + (((l + r) / 2 - l + 1) << 1))]);
  }
  void update(int kth, int who) { update(0, 0, n - 1, kth, who); }
  int qmax(int u, int l, int r, int kth) {
    if (dom[kth].x + dom[kth].h - 1 < dom[l].x || dom[r].x < dom[kth].x + 1) {
      return z.who;
    }
    if (dom[kth].x + 1 <= dom[l].x && dom[r].x <= dom[kth].x + dom[kth].h - 1) {
      return st[u].who;
    }
    return max(
        qmax((u + 1), l, (l + r) / 2, kth),
        qmax((u + (((l + r) / 2 - l + 1) << 1)), (l + r) / 2 + 1, r, kth));
  }
  int qmax(int kth) { return qmax(0, 0, n - 1, kth); }
};
segment_tree st;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(15);
  cin >> n;
  st = segment_tree(n);
  for (int i = (0); i <= ((n)-1); i += (+1)) {
    cin >> dom[i].x >> dom[i].h;
    dom[i].i = i;
  }
  sort(dom, dom + n, [&](domino a, domino b) { return a.x < b.x; });
  for (int i = (n - 1); i >= (0); i += (-1)) {
    int j = max(i, st.qmax(i));
    ans[dom[i].i] = j - i + 1;
    st.update(i, j);
  }
  for (int i = (0); i <= ((n)-1); i += (+1)) {
    cout << ans[i] << " \n"[i == n - 1];
  }
  return 0;
}
