#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool debug = false;
struct dd {
  int x, h, id;
  int sum = 1, next = -1;
  bool operator<(const dd &b) const { return x > b.x; }
};
dd dos[100005];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &dos[i].x, &dos[i].h);
    dos[i].id = i;
  }
  sort(dos, dos + n);
  int j;
  int ans[n];
  ans[dos[0].id] = dos[0].sum;
  for (int i = 1; i < n; i++) {
    int l = dos[i].h + dos[i].x - 1;
    j = i - 1;
    while (j != -1 && l >= dos[j].x) {
      dos[i].sum += dos[j].sum;
      j = dos[j].next;
    }
    dos[i].next = j;
    ans[dos[i].id] = dos[i].sum;
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
