#include <bits/stdc++.h>
const int N = 100100;
using namespace std;
struct domino {
  int x, h, id;
  domino() {}
  bool operator<(const domino &other) const { return x < other.x; }
};
int ans[N];
domino d[N];
int tree[4 * N];
void update(int id, int l, int r, int p, int v) {
  if (l == r) {
    tree[id] = v;
  } else {
    int md = (l + r) / 2;
    if (p <= md) {
      update(2 * id + 1, l, md, p, v);
    } else {
      update(2 * id + 2, md + 1, r, p, v);
    }
    tree[id] = max(tree[2 * id + 1], tree[2 * id + 2]);
  }
}
int query(int id, int l, int r, int i, int j) {
  if (r < i or l > j) {
    return -1;
  } else if (l >= i and r <= j) {
    return tree[id];
  } else {
    int md = (l + r) / 2;
    int q1 = query(2 * id + 1, l, md, i, j);
    int q2 = query(2 * id + 2, md + 1, r, i, j);
    return max(q1, q2);
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> d[i].x >> d[i].h;
    d[i].id = i;
  }
  sort(d, d + n);
  for (int i = n - 1; i >= 0; i--) {
    int lo = i + 1, hi = n - 1, mx = i;
    while (lo <= hi) {
      int md = (lo + hi) / 2;
      if (d[md].x < d[i].x + d[i].h) {
        mx = md;
        lo = md + 1;
      } else {
        hi = md - 1;
      }
    }
    if (mx != i) {
      mx = query(0, 0, n - 1, i + 1, mx);
    }
    ans[d[i].id] = mx - i + 1;
    update(0, 0, n - 1, i, mx);
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
