#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const double PI = 3.141592653589793;
const int N = 100005;
int n, x[N], h[N], kol[N], tab[N], res[N], res2[N], i, M, w[N * 3];
bool cmp(int a, int b) { return x[a] < x[b]; }
void insert(int v, int b) {
  int s = M + v;
  while (s) {
    w[s] = max(w[s], b);
    s /= 2;
  }
}
int query(int a, int b) {
  int va = M + a, vb = M + b;
  int wyn = max(w[va], w[vb]);
  while (va / 2 != vb / 2) {
    if (va % 2 == 0) wyn = max(wyn, w[va + 1]);
    if (vb % 2 == 1) wyn = max(wyn, w[vb - 1]);
    va /= 2;
    vb /= 2;
  }
  return wyn;
}
void init(int a) {
  M = 1;
  while (M < a) M *= 2;
  for (int i = 1; i < 2 * M; i++) w[i] = 0;
  M--;
}
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &x[i], &h[i]);
    kol[i] = i;
  }
  sort(kol, kol + n, cmp);
  for (i = 0; i < n; i++) tab[i] = x[kol[i]];
  tab[n] = INF;
  for (i = 0; i < n; i++)
    res[i] = upper_bound(tab, tab + n + 1, tab[i] + h[kol[i]] - 1) - tab - 1;
  init(n);
  for (i = n - 1; i >= 0; i--) {
    if (res[i] != i) res[i] = query(i + 1, res[i] + 1);
    insert(i + 1, res[i]);
  }
  for (i = 0; i < n; i++) res2[kol[i]] = res[i] - i + 1;
  for (i = 0; i < n; i++) printf("%d ", res2[i]);
  printf("\n");
  return 0;
}
