#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<long long int> X(n + 1), H(n + 1);
  vector<pair<long long int, long long int> > tt;
  vector<int> P(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> X[i] >> H[i];
    tt.push_back(make_pair(X[i], i));
  }
  X[n] = 0;
  for (int i = 0; i < n; i++) X[n] = max(X[n], X[i] + H[i]);
  sort(tt.begin(), tt.end());
  vector<pair<int, int> > t;
  t.push_back(make_pair(n, n));
  for (int j = n - 1; j >= 0; j--) {
    int i = tt[j].second;
    while (X[i] + H[i] > X[t[t.size() - 1].first]) t.pop_back();
    P[i] = t[t.size() - 1].second - j;
    t.push_back(make_pair(i, j));
  }
  for (int i = 0; i < n; i++) printf("%d%c", P[i], (i == n - 1 ? '\n' : ' '));
  return 0;
}
