#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
const int INF = 1e9 + 100;
int tree[4 * N], Max, fa[N], ans[N];
struct node {
  int xi, high, i, Max_xi;
} x[N];
vector<int> v[N];
map<int, int> m;
bool com(node k1, node k2) { return k1.xi < k2.xi; }
int Find(int k) {
  int k1 = k, k2;
  while (k != fa[k]) k = fa[k];
  while (k1 != k) {
    k2 = fa[k1];
    fa[k1] = k;
    k1 = k2;
  }
  return k;
}
void push_up(int k) { tree[k] = max(tree[k * 2], tree[k * 2 + 1]); }
void build(int l, int r, int k) {
  if (l == r) {
    tree[k] = x[l].Max_xi;
    return;
  }
  int mid = (l + r) / 2;
  build(l, mid, k * 2);
  build(mid + 1, r, k * 2 + 1);
  push_up(k);
}
void Query(int L, int R, int l, int r, int k) {
  if (L <= l && r <= R) {
    Max = max(Max, tree[k]);
    return;
  }
  int mid = (l + r) / 2;
  if (L <= mid) Query(L, R, l, mid, k * 2);
  if (R > mid) Query(L, R, mid + 1, r, k * 2 + 1);
}
int main() {
  int n, i, cnt = 0, k, l, r, mid, ll, rr, w, A, B;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x[i].xi, &x[i].high);
    x[i].i = i;
    x[i].Max_xi = x[i].xi + x[i].high - 1;
    fa[i] = i;
  }
  sort(x + 1, x + n + 1, com);
  build(1, n, 1);
  for (i = 1; i <= n; i++) {
    if (!m.count(x[i].Max_xi)) m[x[i].Max_xi] = ++cnt;
    k = m[x[i].Max_xi];
    v[k].push_back(i);
  }
  for (i = 1; i <= n; i++) {
    l = i;
    r = n + 1;
    while (l + 1 < r) {
      mid = (l + r) / 2;
      if (x[mid].xi <= x[i].Max_xi)
        l = mid;
      else
        r = mid;
    }
    if (l != i) {
      Max = -INF;
      Query(i + 1, l, 1, n, 1);
      k = m[Max];
      ll = 0;
      rr = v[k].size() + 1;
      while (ll + 1 < rr) {
        mid = (ll + rr) / 2;
        if (v[k][mid - 1] >= i + 1)
          rr = mid;
        else
          ll = mid;
      }
      rr--;
      w = v[k].size();
      while (rr < w && v[k][rr] <= l) {
        A = Find(i);
        B = Find(v[k][rr]);
        if (A != B) fa[A] = B;
        rr++;
      }
    }
  }
  for (i = 1; i <= n; i++) {
    k = Find(i);
    ans[x[i].i] = k - i + 1;
  }
  for (i = 1; i <= n; i++) printf("%d ", ans[i]);
}
