#include <bits/stdc++.h>
using namespace std;
struct building {
  int id;
  int x;
  int h;
};
bool compare(building a, building b) { return a.x < b.x; }
int main() {
  int n;
  cin >> n;
  building ara[n + 5];
  for (int i = 0; i < n; i++) {
    ara[i].id = i;
    cin >> ara[i].x >> ara[i].h;
  }
  sort(ara, ara + n, compare);
  int res[n + 5], ans[n + 5];
  for (int i = 0; i < n; i++) {
    res[i] = 1;
  }
  for (int i = n - 1, j; i >= 0; i--) {
    for (j = i + 1; j < n && ara[i].x + ara[i].h - 1 >= ara[j].x;) {
      j += res[j];
    }
    res[i] = j - i;
    ans[ara[i].id] = res[i];
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
