#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100001;
struct info {
  long long x, h;
  int idx;
} a[MAXN];
int n;
long long dp[MAXN], ans[MAXN];
bool cmp(info a, info b) { return a.x > b.x; }
int main(int argc, char const *argv[]) {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%lld %lld", &a[i].x, &a[i].h);
    a[i].idx = i;
  }
  sort(a, a + n, cmp);
  for (int i = 0; i < n; ++i) {
    dp[i] = 1;
    for (int j = i - 1; j >= 0; j -= dp[j]) {
      if (a[i].x + a[i].h - 1 >= a[j].x) {
        dp[i] += dp[j];
      } else
        break;
    }
  }
  for (int i = 0; i < n; ++i) {
    ans[a[i].idx] = dp[i];
  }
  for (int i = 0; i < n; ++i) {
    printf("%lld ", ans[i]);
  }
  printf("\n");
  return 0;
}
