#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
struct node {
  int ind, l, i;
} ND[N];
bool cmp(const node &a, const node &b) { return (a.ind < b.ind); }
int ANS[N], AH[N], n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &ND[i].ind, &ND[i].l), ND[i].i = i;
  sort(ND, ND + n, cmp);
  ND[n].ind = INT_MAX;
  for (int i = n - 1; i >= 0; i--) {
    AH[i] = i + 1;
    while (ND[i].ind + ND[i].l > ND[AH[i]].ind) AH[i] = AH[AH[i]];
    ANS[ND[i].i] = AH[i] - i;
  }
  for (int i = 0; i < n; i++) printf("%d ", ANS[i]);
}
