#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 5;
struct domino {
  int x, h, idx;
  bool operator<(const domino& that) const { return x < that.x; }
} a[N];
int ans[N];
int n;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i].x, &a[i].h);
    a[i].idx = i;
  }
  sort(a, a + n);
  ans[a[n - 1].idx] = 1;
  stack<domino> stk;
  stk.push(a[n - 1]);
  for (int i = n - 2; i >= 0; i--) {
    int reach = a[i].x + a[i].h - 1;
    ans[a[i].idx] = 1;
    while (!stk.empty() && reach >= stk.top().x) {
      ans[a[i].idx] += ans[stk.top().idx];
      reach = max(reach, stk.top().x + stk.top().h - 1);
      stk.pop();
    }
    stk.push(a[i]);
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
