#include <bits/stdc++.h>
using namespace std;
int n;
int ans[100005];
int tree[450000];
struct ty {
  int x, h, id, to;
} d[100005];
bool cmp(ty a, ty b) { return a.x < b.x; }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &d[i].x, &d[i].h);
    d[i].id = i;
    d[i].to = d[i].x + d[i].h - 1;
  }
  sort(d + 1, d + n + 1, cmp);
  ans[d[n].id] = 1;
  for (int i = n - 1; i >= 1; i--) {
    int last = d[i].to;
    int q = i + 1;
    ans[d[i].id] = 1;
    while (1) {
      if (q > n) break;
      if (d[q].x <= last)
        ans[d[i].id] += ans[d[q].id];
      else
        break;
      q = q + ans[d[q].id];
    }
  }
  for (int i = 1; i < n; i++) {
    printf("%d ", ans[i]);
  }
  printf("%d\n", ans[n]);
  return 0;
}
