#include <bits/stdc++.h>
using namespace std;
struct T {
  int n, first, h;
};
inline bool operator<(const T& a, const T& b) { return a.first < b.first; }
vector<T> d;
T a[111111];
int n;
int ans[111111];
int main() {
  scanf("%d", &n);
  for (int(i) = 0; (i) < (n); ++(i)) {
    scanf("%d%d", &a[i].first, &a[i].h);
    a[i].n = i;
  }
  sort(a, a + n);
  reverse(a, a + n);
  d.push_back(a[0]);
  for (int i = 1; i < n; ++i) {
    int high = i - 1;
    int low = 0;
    while (high - low > 1) {
      int mid = (high + low) / 2;
      if (a[mid].first >= a[i].first + a[i].h)
        low = mid;
      else
        high = mid;
    }
    if (a[low].first >= a[i].first + a[i].h) ++low;
    if (a[low].first >= a[i].first + a[i].h) ++low;
    while ((int)d.size() && d.back().first < a[i].first + a[i].h) {
      ans[a[i].n] += ans[d.back().n] + 1;
      d.pop_back();
    }
    d.push_back(a[i]);
  }
  for (int(i) = 0; (i) < (n); ++(i)) {
    if (i) printf(" ");
    printf("%d", ans[i] + 1);
  }
  cout << endl;
}
