#include <bits/stdc++.h>
using namespace std;
template <class T, class L>
bool smax(T &x, L y) {
  return x < y ? (x = y, 1) : 0;
}
template <class T, class L>
bool smin(T &x, L y) {
  return y < x ? (x = y, 1) : 0;
}
const int maxn = 1e5 + 17;
struct S {
  int x, h, idx;
} a[maxn];
int n, dp[maxn], ans[maxn];
vector<pair<int, int> > v;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i].x >> a[i].h, a[i].idx = i;
  sort(a, a + n, [](S &a, S &b) { return a.x < b.x; });
  for (int i = n - 1; ~i; i--) {
    auto it =
        upper_bound(v.rbegin(), v.rend(), pair<int, int>(a[i].x + a[i].h, -1));
    if (it == v.rbegin())
      dp[i] = 1;
    else {
      it--;
      dp[i] = it->second - i + dp[it->second];
    }
    ans[a[i].idx] = dp[i];
    while (v.size() &&
           a[v.back().second].x + a[v.back().second].h <= a[i].x + a[i].h)
      v.pop_back();
    v.push_back({a[i].x, i});
  }
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
  cout << '\n';
  return 0;
}
