#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
int x[MAX], h[MAX];
vector<pair<int, int> > pts;
int ans[MAX];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d %d", &x[i], &h[i]);
    pts.push_back({x[i], i});
  }
  sort(pts.begin(), pts.end());
  stack<int> S;
  for (int i = n - 1; i >= 0; --i) {
    int id = pts[i].second;
    ans[id] = 1;
    while (!S.empty()) {
      if (x[id] + h[id] > x[pts[S.top()].second]) {
        ans[id] += ans[pts[S.top()].second];
        S.pop();
      } else {
        break;
      }
    }
    S.push(i);
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
