#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
const int INF = 0x8F8F8F8F;
int n;
int x[MAX], h[MAX], id[MAX], ans[MAX], bit[MAX], furthest[MAX];
void update(int idx, int val) {
  while (idx <= n) {
    bit[idx] = max(bit[idx], val);
    idx += idx & -idx;
  }
}
int query(int idx) {
  int maxx = INF;
  while (idx) {
    maxx = max(maxx, bit[idx]);
    idx -= idx & -idx;
  }
  return maxx;
}
int main() {
  scanf("%d", &n);
  for (int i = int(1); i < int(n + 1); i++) {
    scanf("%d %d", x + i, h + i);
    id[i] = i;
  }
  auto cmp = [](int lhs, int rhs) { return x[lhs] < x[rhs]; };
  sort(id + 1, id + n + 1, cmp);
  memset(bit, INF, sizeof bit);
  for (int i = int(n); i >= int(1); i--) {
    int fall = x[id[i]] + h[id[i]] - 1;
    int left = i, right = n;
    int pos = i;
    while (left <= right) {
      int mid = (left + right) / 2;
      if (x[id[mid]] <= fall) {
        pos = mid;
        left = mid + 1;
      } else {
        right = mid - 1;
      }
    }
    furthest[i] = max(fall, query(pos));
    update(i, furthest[i]);
    left = i, right = n;
    pos = i;
    while (left <= right) {
      int mid = (left + right) / 2;
      if (x[id[mid]] <= furthest[i]) {
        pos = mid;
        left = mid + 1;
      } else {
        right = mid - 1;
      }
    }
    ans[id[i]] = pos - i + 1;
  }
  for (int i = int(1); i < int(n + 1); i++) {
    printf("%d ", ans[i]);
  }
  puts("");
  return 0;
}
